Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #8247: Added explanation to admin docs to point out that AdminS…

…ite can be subclassed and instantiated like any other Python class

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3a7fc0c7979d53119a7478ef4f614415710b51d7 1 parent c0b53b3
James Bennett authored

Showing 1 changed file with 14 additions and 1 deletion. Show diff stats Hide diff stats

  1. 15  docs/ref/contrib/admin.txt
15  docs/ref/contrib/admin.txt
@@ -226,7 +226,7 @@ You have four possible values that can be used in ``list_display``:
226 226
               list_display = (upper_case_name,)
227 227
     
228 228
     * A string representing an attribute on the ``ModelAdmin``. This behaves
229  
-      the same as the callable. For example::
  229
+ same as the callable. For example::
230 230
       
231 231
           class PersonAdmin(admin.ModelAdmin):
232 232
               list_display = ('upper_case_name',)
@@ -852,6 +852,19 @@ information.
852 852
 ``AdminSite`` objects
853 853
 =====================
854 854
 
  855
+A Django administrative site is represented by an instance of
  856
+``django.contrib.admin.sites.AdminSite``; by default, an instance of
  857
+this class is created as ``django.contrib.admin.site`` and you can
  858
+register your models and ``ModelAdmin`` instances with it.
  859
+
  860
+If you'd like to set up your own administrative site with custom
  861
+behavior, however, you're free to subclass ``AdminSite`` and override
  862
+or add anything you like. Then, simply create an instance of your
  863
+``AdminSite`` subclass (the same way you'd instantiate any other
  864
+Python class), and register your models and ``ModelAdmin`` subclasses
  865
+with it instead of using the default.
  866
+
  867
+
855 868
 Hooking ``AdminSite`` instances into your URLconf
856 869
 -------------------------------------------------
857 870
 

0 notes on commit 3a7fc0c

Please sign in to comment.
Something went wrong with that request. Please try again.