Skip to content

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
Contributor

@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.

).distinct(
'user', 'task', 'submit_type'
).select_related(
'user', 'user__school', 'task'
Copy link
Contributor

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.

3 participants