Opened 8 years ago

Closed 7 years ago

#8933 closed (fixed)

Make more admin templates overridable

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

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 8 years ago.
fix to make more templates overridable
ticket8933-r8979.2.diff (3.5 KB) - added by Jannis Leidel 8 years ago.
small fix to appease SmilyChris' niticking

Download all attachments as: .zip

Change History (14)

Changed 8 years ago by Jannis Leidel

Attachment: ticket8933-r8979.diff added

fix to make more templates overridable

comment:1 Changed 8 years ago by Jannis Leidel

Has patch: set
milestone: post-1.0
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 8 years ago by Jannis Leidel

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 Changed 8 years ago by Brian Rosner

Triage Stage: UnreviewedAccepted

comment:6 Changed 8 years ago by Brian Rosner

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 Changed 8 years ago by Brian Rosner

Owner: changed from Jannis Leidel to Brian Rosner

comment:8 Changed 8 years ago by Brian Rosner

Status: newassigned

comment:9 Changed 8 years ago by Chris Beaven

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)

Changed 8 years ago by Jannis Leidel

Attachment: ticket8933-r8979.2.diff added

small fix to appease SmilyChris' niticking

comment:10 Changed 8 years ago by Brian Rosner

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 Changed 7 years ago by Jannis Leidel

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

comment:12 Changed 7 years ago by Jannis Leidel

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