#17229: Invalid '==' expression silently ignored leading to invalid result
-------------------------------------+-------------------------------------
Reporter: anatoly techtonik | Owner: nobody
<techtonik@…> | Status: reopened
Type: Bug | Version: 1.2
Component: Template system | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by charettes):
I know it might feel a bit hackish but I think you get work around this
limitation by using the
[https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#default-if-
none default_if_none] filter.
{{{
{% if closed|default_if_none:'None' == 'None' %}
None
{% else %}{% if closed %}
True
{% else %}
False
{% endif %}{% endif %}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/17229#comment:4>
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.