#17229: Invalid '==' expression silently ignored leading to invalid result
-------------------------------------------------+--------------------
     Reporter:  anatoly techtonik <techtonik@…>  |      Owner:  nobody
         Type:  Bug                              |     Status:  new
    Component:  Template system                  |    Version:  1.2
     Severity:  Normal                           |   Keywords:
 Triage Stage:  Unreviewed                       |  Has patch:  0
Easy pickings:  0                                |      UI/UX:  1
-------------------------------------------------+--------------------
 Let me clarify the title - I am not sure the expression below is invalid.
 It is the expression I intuitively expect to work. But perhaps Django it
 is a specifics of template language. In any case it should either complain
 or produce expected output, which it doesn't.

 {{{
 _{{ closed }}_
 {% if closed == True %} ***** {% endif %}
 }}}

 If `closed` variable is equal to `None`, the example above will output the
 string:
 {{{
 _None_ *****
 }}}
 Expected is to output nothing or to give a warning about invalid right-
 side argument.

 If `closed` is boolean (not string) and is equal to `True`, it will output
 {{{
 _True_
 }}}
 Expected is to output
 {{{
 _True_ *****
 }}}
 or to give a warning about invalid right-side argument.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17229>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to