Allow @register.inclusion_tag to take a template as well as a template name
|Reported by:||Jeremy Dunck||Owned by:||nobody|
|Cc:||Daniel Quinn||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Sometimes, I want the convenience of an inclusion_tag without specifying an external template. I can't use simple_tag because I need context access.
@inclusion_tag allows either a template name or an iterable of template names.
The attach patch allows a template to be given directly, as well.
I noticed @inclusion_tag doesn't seem to be currently tested, and this patch doesn't include tests. Where should @inclusion_tag tests live?
Change History (8)
comment:4 Changed 6 years ago by
|Patch needs improvement:||unset|