Opened 15 years ago
Closed 15 years ago
#13745 closed (wontfix)
Make extends allow select from multiple templates for themes fallback
Reported by: | Andrey Gusev | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | extends multiple select list | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Attached patch allows us to easy make "multiple themed" site with fallback to default theme if current doesn't have requested template. Unit tests OK.
Example code:
cw = RequestContext(request, { 'base_template': [ 'mytheme/b.html', 'default/b.html' ] }) res = Template(""" {% extends base_template %} {% block abc %}some content{% endblock %} {% block content %}some other content{% endblock %}' """, cw)
Attachments (2)
Change History (3)
by , 15 years ago
Attachment: | template_extends_select_multi.diff added |
---|
by , 15 years ago
Attachment: | template_extends_select_multi.2.diff added |
---|
comment:1 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
It strikes me that this is something that should be handled by a fallback in the template directories, not in the template/context itself. This is the way that the admin allows you to override admin base templates with local themes/customizations.