Author: brosner
Date: 2008-08-23 11:27:12 -0500 (Sat, 23 Aug 2008)
New Revision: 8487
Modified:
django/trunk/django/contrib/admin/sites.py
Log:
Fixed #8498 -- Add the ability to customize the template for app_index similar
to the other views on the AdminSite class. Thanks Jannis Leidel for the patch.
Modified: django/trunk/django/contrib/admin/sites.py
===================================================================
--- django/trunk/django/contrib/admin/sites.py 2008-08-23 15:03:40 UTC (rev
8486)
+++ django/trunk/django/contrib/admin/sites.py 2008-08-23 16:27:12 UTC (rev
8487)
@@ -47,6 +47,7 @@
index_template = None
login_template = None
+ app_index_template = None
def __init__(self):
self._registry = {} # model_class class -> admin_class instance
@@ -397,7 +398,7 @@
raise http.Http404('The requested admin page does not
exist.')
# Sort the models alphabetically within each app.
app_dict['models'].sort(lambda x, y: cmp(x['name'], y['name']))
- return render_to_response('admin/app_index.html', {
+ return render_to_response(self.app_index_template or
'admin/app_index.html', {
'title': _('%s administration' % capfirst(app_label)),
'app_list': [app_dict]
}, context_instance=template.RequestContext(request))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---