-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: master
Are you sure you want to change the base?
School history #1173
Conversation
{{ field.errors }} | ||
{% if field.name == "school" %} | ||
<span class="col-md-7"> | ||
{{ field | bootstrap_inline}} |
There was a problem hiding this comment.
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.
There was a problem hiding this 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' |
There was a problem hiding this comment.
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.
Closes #1092
Obsahuje dátovú migráciu, ktorá premigruje školy z modelu
User
doUserSchool
. 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
aprefetch_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.