#9637 closed (fixed)
extrastyle block in customized admin/base_site.html overridden by extending templates
Reported by: | rvdrijst | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | admin template extrastyle base_site.html | |
Cc: | rvdrijst@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In changeset:9463 the following default admin templates were changed to use the {% block extrastyle %} declared in admin/base.html:
- django/contrib/admin/templates/admin/change_form.html
- django/contrib/admin/templates/admin/change_list.html
- django/contrib/admin/templates/admin/index.html
- django/contrib/admin/templates/admin/login.html
These four templates extend admin/base_site.html, not admin/base.html and although the default admin/base_site.html doesn't override the {% block extrastyle %}, a customized version of this template might. In that case, the contents of this {% block extrastyle %} are overridden by the four mentioned templates, which is a bug.
The solution is simple enough: prefix the content of the {% block extrastyle %} in these four templates with {{ block.super }} to render the possible content of the {% block extrastyle %} in a customized base_site.html (see patch).
Attachments (1)
Change History (3)
by , 16 years ago
comment:1 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was fixed in r9690 . (I don't know why it wasn't automatically closed)