Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

School history #1173

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

School history #1173

wants to merge 9 commits into from

Conversation

dodo42
Copy link
Contributor

@dodo42 dodo42 commented Jun 27, 2018

Closes #1092

Obsahuje dátovú migráciu, ktorá premigruje školy z modelu User do UserSchool. Pozrite, či behá v pohde. Ja si ju tiež ešte otestujem.

Naprieč kódom som na mnohých miestach odstránil školu zo select_related a prefetch_related. Poupravoval som exporty dát, tvorbu userov v testoch.

V zoznamoch účastníkov a výsledkovkách sa už zobrazuje škola v danom čase.

{{ field.errors }}
{% if field.name == "school" %}
<span class="col-md-7">
{{ field | bootstrap_inline}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tu by sa zišlo mať autocomplete. Hral som sa s tým asi hodinu, skúšal som podobné veci ako je v registrácii, ale nepodarilo sa mi to. Viete mi poradiť? Podobne by sa aj na dátum zišiel kalendár ako pri registrácii.

Copy link
Member

@mhozza mhozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na aktualnej vysledkovke to vyzerie cez 4000 queries.
Treba zoptimalizovat.

@@ -111,7 +111,7 @@ def get_submit_queryset(self, res_request):
).distinct(
'user', 'task', 'submit_type'
).select_related(
'user', 'user__school', 'task'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tieto select related sluzia na optimalizaciu, treba ich nahradit nejakou alternativou.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants