#17664: {% if %} template tag silences exceptions inconsistently
-------------------------------------+-------------------------------------
     Reporter:  Tai Lee              |                    Owner:  Robert
                                     |  Roskam
         Type:  Bug                  |                   Status:  assigned
    Component:  Template system      |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  smart if tag         |             Triage Stage:  Accepted
  queryset exception silenced        |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Jon Dufresne):

 > I think the choice to let boolean operations silence exceptions was a
 mistake. I think we should change this.

 I agree. Boolean conditions often hide private data. In the case of a
 programming mistake, I'd prefer an exception thrown so the programmer can
 fix it instead of plowing ahead with a potentially incorrect condition.
 Depending on the template, assuming a value could display private data to
 the wrong user.

 > So the intermediate step might be to raise a warning in the console for
 a minor version that exceptions will stopped being coerced to False soon.

 +1 This approach sounds sensible to me.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17664#comment:23>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.8544a6f3db3fc6b70dc31d53d2eee960%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to