Django

Code

Ticket #8933 (assigned)

Opened 2 months ago

Last modified 3 weeks ago

Make more admin templates overridable

Reported by: jezdez Assigned to: brosner (accepted)
Milestone: Component: django.contrib.admin
Version: 1.0 Keywords:
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 1 Patch needs improvement: 0

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

ticket8933-r8979.diff (3.2 kB) - added by jezdez on 09/07/08 16:45:59.
fix to make more templates overridable
ticket8933-r8979.2.diff (3.5 kB) - added by jezdez on 10/07/08 05:28:49.
small fix to appease SmilyChris?' niticking

Change History

09/07/08 16:45:59 changed by jezdez

  • attachment ticket8933-r8979.diff added.

fix to make more templates overridable

09/07/08 16:48:25 changed by jezdez

  • needs_better_patch changed.
  • has_patch set to 1.
  • needs_docs changed.
  • needs_tests changed.
  • milestone deleted.

09/15/08 04:31:36 changed by jezdez

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.

09/15/08 04:46:58 changed by jezdez

09/29/08 15:23:27 changed by jezdez

09/29/08 15:27:55 changed by brosner

  • stage changed from Unreviewed to Accepted.

09/29/08 15:28:51 changed by brosner

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.

10/05/08 21:48:48 changed by brosner

  • owner changed from jezdez to brosner.

10/05/08 21:49:45 changed by brosner

  • status changed from new to assigned.

10/05/08 21:51:08 changed by SmileyChris

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)

10/07/08 05:28:49 changed by jezdez

  • attachment ticket8933-r8979.2.diff added.

small fix to appease SmilyChris?' niticking

10/28/08 13:52:50 changed by brosner

  • needs_tests set to 1.

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.


Add/Change #8933 (Make more admin templates overridable)




Change Properties
Action