-
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
Fix testing result being displayed as None #965
Conversation
- Happened only when protocol was loaded through AJAX, because the AJAX view wasn't properly updated when we moved the verbose tester responses to constants.py - maybe we should consider not displaying it like this, alternative usage may be for example creating a specific templatetag |verbose_tester_response, or adding the SUBMIT_VERBOSE_RESPONSE constant to global template context? fixes #894
Current coverage is 71.51% (diff: 100%)@@ master #965 diff @@
==========================================
Files 214 214
Lines 6981 6982 +1
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 4992 4993 +1
Misses 1989 1989
Partials 0 0
|
Momentalne sa to riesi takto Je to tak riesene preto, ze sa to pouizva iba pre renderovani protokolu - a tak neviem, ci ma zmysel kvoli tomut robit dalsi filter. |
vidim ako sa to riesi, vid. fix ktory som spravil.., co sa mi nie celkom paci na sucasnom rieseni je fakt, ze je error-prone na taketo errory, ake nastali tuna ==> kazdy view, ktory pouziva template protocol.html musi davat do contextu premennu submit_verbose_response aby to fungovalo, inak to skonci s None custom filter, assignment_tag, alebo context_processor umoznuju k tejto premennej pristupovat priamo z templatu, obchadzajuc view, takze keby sme nahodou pridali treti view, ktory pouziva tento template, nemuseli by sme pri nom davat pozor na tuto context premennu |
On Sun, Jan 08, 2017 at 01:56:55PM -0800, Roman Hudec wrote:
vidim ako sa to riesi, vid. fix ktory som spravil.., co sa mi nie
celkom paci na sucasnom rieseni je fakt, ze je error-prone na taketo
errory, ake nastali tuna ==> kazdy view, ktory pouziva template
protocol.html musi davat do contextu premennu
submit_verbose_response aby to fungovalo, inak to skonci s None
custom filter, assignment_tag, alebo context_processor umoznuju k
tejto premennej pristupovat priamo z templatu, obchadzajuc view,
takze keby sme nahodou pridali treti view, ktory pouziva tento
template, nemuseli by sme pri nom davat pozor na tuto context
premennu
Toto znie ako job pre custom tag alebo filter; context processor je
príliš overkill, nemá zmysel zadrbávať globálny context pre všetky
renderované templaty niečím, čo je pomerne špecifické.
|
No, Roman keď chceš, tak to môžeš spraviť custom filtrom, ale nemyslím si, Nová submit app zatiaľ nerefershuje stránku po dostaní protokolu, ale napísal som si tam poznámku, že toto chcem možno riešiť custom filtrom ... tuto trojsten/submit#8 |
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.
Toto approvujem ako quick fix. Idealne by to bolo spravit poriadne filtrom alebo tagom. Moze byt zvlast PR.
Ja v dobrej viere ocakavam, ze do mesiaca/dvoch bude nova submit app a bude to spravene poriadne tam (kludne tuto feature do novej submit app dokodim, kedze tam este nie je), namiesto toho aby sa to fixovalo na viacerych miestach.. (Ak bude submit app az neskor, tak sa ozvite a spravim poriadny fix aj sem) |
fixes #894