Author: ubernostrum
Date: 2008-08-30 00:29:19 -0500 (Sat, 30 Aug 2008)
New Revision: 8732
Modified:
django/trunk/docs/ref/contrib/admin.txt
Log:
Fixed #8247: Added explanation to admin docs to point out that AdminSite can be
subclassed and instantiated like any other Python class
Modified: django/trunk/docs/ref/contrib/admin.txt
===================================================================
--- django/trunk/docs/ref/contrib/admin.txt 2008-08-30 05:09:03 UTC (rev
8731)
+++ django/trunk/docs/ref/contrib/admin.txt 2008-08-30 05:29:19 UTC (rev
8732)
@@ -226,7 +226,7 @@
list_display = (upper_case_name,)
* A string representing an attribute on the ``ModelAdmin``. This behaves
- the same as the callable. For example::
+ same as the callable. For example::
class PersonAdmin(admin.ModelAdmin):
list_display = ('upper_case_name',)
@@ -852,6 +852,19 @@
``AdminSite`` objects
=====================
+A Django administrative site is represented by an instance of
+``django.contrib.admin.sites.AdminSite``; by default, an instance of
+this class is created as ``django.contrib.admin.site`` and you can
+register your models and ``ModelAdmin`` instances with it.
+
+If you'd like to set up your own administrative site with custom
+behavior, however, you're free to subclass ``AdminSite`` and override
+or add anything you like. Then, simply create an instance of your
+``AdminSite`` subclass (the same way you'd instantiate any other
+Python class), and register your models and ``ModelAdmin`` subclasses
+with it instead of using the default.
+
+
Hooking ``AdminSite`` instances into your URLconf
-------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---