Opened 16 years ago

Closed 14 years ago

#8933 closed (fixed)

Make more admin templates overridable

Reported by: Jannis Leidel Owned by: Jannis Leidel
Component: contrib.admin Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The following methods are missing options to override their templates:

  • django.contrib.admin.sites.AdminSite: logout, password_change and password_change_done
  • django.contrib.auth.admin.UserAdmin: add_view and user_change_password

Attachments (2)

ticket8933-r8979.diff (3.2 KB ) - added by Jannis Leidel 16 years ago.
fix to make more templates overridable
ticket8933-r8979.2.diff (3.5 KB ) - added by Jannis Leidel 15 years ago.
small fix to appease SmilyChris' niticking

Download all attachments as: .zip

Change History (14)

by Jannis Leidel, 16 years ago

Attachment: ticket8933-r8979.diff added

fix to make more templates overridable

comment:1 by Jannis Leidel, 16 years ago

Has patch: set
milestone: post-1.0

comment:2 by Jannis Leidel, 16 years ago

Just to be a bit more specific why this is useful:

I use the new admin in django-mobileadmin to provide a special admin interface for mobile devices by loading admin templates depending on the user agent of the browser. The templates used in most of the admin views can already be overridden, those five are missing.

comment:5 by Brian Rosner, 15 years ago

Triage Stage: UnreviewedAccepted

comment:6 by Brian Rosner, 15 years ago

This must have slipped under my radar before 1.0. It would have been best to have gotten it in before 1.0, but the timing was a bit off. This looks good heading towards 1.1 though.

comment:7 by Brian Rosner, 15 years ago

Owner: changed from Jannis Leidel to Brian Rosner

comment:8 by Brian Rosner, 15 years ago

Status: newassigned

comment:9 by Chris Beaven, 15 years ago

If I was to nitpick, I'd say that the new 'registration' templates shouldn't add the keyword arg unless they need to (otherwise you're hard-coding a default in two places)

by Jannis Leidel, 15 years ago

Attachment: ticket8933-r8979.2.diff added

small fix to appease SmilyChris' niticking

comment:10 by Brian Rosner, 15 years ago

Needs tests: set

This ticket is going to need some tests. There are tests located in tests/regressiontests/admin_views/tests.py for AdminSite templates. The UserAdmin templates are new so similar tests will likely need to be added in the auth app. Ultimately this patch needs documentation as well. However, I am going to tackle that as a part of getting more complete admin docs of the options available. Most of what is missing is template related anyways.

comment:11 by Jannis Leidel, 14 years ago

Owner: changed from Brian Rosner to Jannis Leidel
Status: assignednew
Version: 1.0SVN

comment:12 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

(In [12217]) Fixed #8933 - Allow more admin templates to be overridden.

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