Allow @register.inclusion_tag to take a template as well as a template name
|Reported by:||jdunck||Owned by:||nobody|
|Cc:||danielquinn||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)
Changed 5 years ago by jdunck
comment:2 Changed 4 years ago by julien
- Easy pickings set
- Severity set to Normal
- Type set to New feature
Changed 4 years ago by tcoenen
comment:4 Changed 4 years ago by tcoenen
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- UI/UX unset
comment:5 Changed 4 years ago by danielquinn
- Cc danielquinn added
- Triage Stage changed from Accepted to Ready for checkin