Changes between Initial Version and Version 1 of Ticket #18526, comment 10


Ignore:
Timestamp:
Feb 22, 2013, 4:24:17 AM (12 years ago)
Author:
Gregor Müllegger

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18526, comment 10

    initial v1  
    1 Me neither. I think ``TEMPLATE_STRING_IF_INVALID`` is kind of bad-practice debugging. So a +1 for deprecating it. What would be more elegant (but outside of django core) would be to have a django-debug-toolbar panel that lists all the "invalid" template variables used in the templates of the current page. But I don't know if an implementation is sanely possible at the moment (if there exist any usefull hooks in the template engine).
     1I don't use it either to debug. This bug report arose from a bug reported for django-floppyforms: https://github.com/brutasse/django-floppyforms/issues/37 . We rely heavily on the `default` filter in floppyforms for the form rendering. It's very handy for following occations:
     2
     3{{{
     4# in hello.html
     5Hello {{ name|default:"John Doe" }}.
     6
     7# in index.html
     8{% include "hello.html" with name="Sam" %} # overwriting the default
     9{% include "hello.html" %} # using the default
     10}}}
     11
     12I think `TEMPLATE_STRING_IF_INVALID` is kind of bad-practice debugging. So a +1 for deprecating it. What would be more elegant (but outside of django core) would be to have a django-debug-toolbar panel that lists all the "invalid" template variables used in the templates of the current page. But I don't know if an implementation is sanely possible at the moment (if there exist any usefull hooks in the template engine).
    213
    314However this would also leave out the debugging of templates that are rendered out of the request-response cycle.
Back to Top