inclusion_tag behavior on variable not in context is inconsistent
|Reported by:||Leo Shklovskii||Owned by:|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
If you use a variable that doesn't exist in the context as an argument to a template tag created with
@register.inclusion_tag() the tag throws a VariableDoesNotExist which is inconsistent with the way that all other tags behave in the template language.
I would expect that the wrapping
inclusion_tag() code just passes
None to the wrapped templatetag for the argument rather than blowing up.
Change History (10)
comment:2 Changed 7 years ago by
|Owner:||changed from nobody to Leo Shklovskii|
|Status:||new → assigned|