Author: jacob
Date: 2009-04-01 09:13:59 -0500 (Wed, 01 Apr 2009)
New Revision: 10317

Modified:
   django/trunk/django/contrib/admin/sites.py
   django/trunk/docs/ref/contrib/admin/index.txt
Log:
Fixed #9908: allow individual app index templates in the admin. Thanks, arne.

Modified: django/trunk/django/contrib/admin/sites.py
===================================================================
--- django/trunk/django/contrib/admin/sites.py  2009-04-01 14:13:43 UTC (rev 
10316)
+++ django/trunk/django/contrib/admin/sites.py  2009-04-01 14:13:59 UTC (rev 
10317)
@@ -398,7 +398,8 @@
             'root_path': self.root_path,
         }
         context.update(extra_context or {})
-        return render_to_response(self.app_index_template or 
'admin/app_index.html', context,
+        return render_to_response(self.app_index_template or 
('admin/%s/app_index.html' % app_label,
+            'admin/app_index.html'), context,
             context_instance=template.RequestContext(request)
         )
 

Modified: django/trunk/docs/ref/contrib/admin/index.txt
===================================================================
--- django/trunk/docs/ref/contrib/admin/index.txt       2009-04-01 14:13:43 UTC 
(rev 10316)
+++ django/trunk/docs/ref/contrib/admin/index.txt       2009-04-01 14:13:59 UTC 
(rev 10317)
@@ -1130,6 +1130,7 @@
 Not every template in ``contrib\admin\templates\admin`` may be overridden per
 app or per model. The following can:
 
+    * ``app_index.html``
     * ``change_form.html``
     * ``change_list.html``
     * ``delete_confirmation.html``


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to