Opened 14 years ago
Closed 11 years ago
#16096 closed New feature (fixed)
Template instances should have an origin attribute.
Reported by: | Jeremy Dunck | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Templates are constructed with an optional origin argument; this is used for debugging purposes.
But I think it would be useful for the Template instance to have an origin attribute -- then template origins could be more easily inspected and logged outside the django.template infrastructure. The specific use case I have in mind is making it clearer to FE devs which templates/template dirs are being used for a given request.
Template's constructor receives an origin parameter, so this should be a simple change.
Change History (5)
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 by , 11 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This makes sense and it can't hurt. Are you thinking of any particular API other than just setting the
origin
attribute to theTemplate
instance?