Opened 15 years ago
Closed 15 years ago
#12283 closed (duplicate)
Inclusion tags should handle arguments not present in the context gracefully
Description ¶
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.
Note:
See TracTickets
for help on using tickets.
Duplciate of #12212