Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#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)

patch.txt (2.7 KB ) - added by rvdrijst 15 years ago.

Download all attachments as: .zip

Change History (3)

by rvdrijst, 15 years ago

Attachment: patch.txt added

comment:1 by Luke Plant, 15 years ago

Resolution: fixed
Status: newclosed

This was fixed in r9690 . (I don't know why it wasn't automatically closed)

comment:2 by (none), 15 years ago

milestone: post-1.0

Milestone post-1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top