#12284: Inclusion tags should handle arguments not present in the context
gracefully
-----------------------------+----------------------------------------------
Reporter: kuon | Owner: nobody
Status: new | Milestone:
Component: Template system | Version: 1.1
Keywords: | Stage: Unreviewed
Has_patch: 0 |
-----------------------------+----------------------------------------------
If we call an inclusion tag like that
{{{
{% my_tag object %}
}}}
and object is not present in the context, an exception will be raised,
thus obliging us to do:
{{{
{% if object %}
{% my_tag object %}
{% else %}
{% my_tag %}
{% endif %}
}}}
It would be better to have the inclusion tag mechanism to handle keys not
present in the context and just default them to None.
--
Ticket URL: <http://code.djangoproject.com/ticket/12284>
Django <http://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.