#9908 closed (fixed)
Allow individual app_index templates for different apps
Reported by: | arne | Owned by: | Jannis Leidel |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | app_index | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
django.contrib.admin allows customization of individual change_list or change_form templates by using a list of templates in the form of (example from render_change_form method):
self.change_form_template or [ "admin/%s/%s/change_form.html" % (app_label, opts.object_name.lower()), "admin/%s/change_form.html" % app_label, "admin/change_form.html" ]
This mechanism does not work for the app_index template but could easily be implmented. I've attached a diff, which allows placing templates at 'admin/<app_label>/app_index.html' for individual apps, while still allowing global customization by setting the app_index_template class attribute and still falling back to 'admin/app_index.html'
Attachments (3)
Change History (10)
by , 16 years ago
Attachment: | app_index_template.diff added |
---|
comment:1 by , 16 years ago
Needs documentation: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
by , 16 years ago
Attachment: | app_index_docs.diff added |
---|
by , 16 years ago
Attachment: | app_index_r9814.diff added |
---|
comment:2 by , 16 years ago
Needs documentation: | unset |
---|---|
Needs tests: | set |
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 16 years ago
milestone: | → 1.1 |
---|---|
Needs tests: | unset |
Triage Stage: | Accepted → Ready for checkin |
comment:4 by , 16 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
Needs a test of the new template.
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Merged both patches and updated to r9814