Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

magic-removal: Fixed #1712 -- Removed typo and clarified use of admin…

… options in model-api docs

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2772 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1809f6e256622d9813d8af9a338d9ba10d8cf531 1 parent 6ec3a4d
Russell Keith-Magee authored April 28, 2006

Showing 1 changed file with 15 additions and 11 deletions. Show diff stats Hide diff stats

  1. 26  docs/model-api.txt
26  docs/model-api.txt
@@ -921,15 +921,17 @@ Here's a list of all possible ``Admin`` options. No options are required. Adding
921 921
 
922 922
     For example (taken from the ``django.contrib.flatpages`` model)::
923 923
 
924  
-        fields = (
925  
-            (None, {
926  
-                'fields': ('url', 'title', 'content', 'sites')
927  
-            }),
928  
-            ('Advanced options', {
929  
-                'classes': 'collapse',
930  
-                'fields' : ('enable_comments', 'registration_required', 'template_name')
931  
-            }),
932  
-        ),
  924
+        class Admin:
  925
+            ...
  926
+            fields = (
  927
+                (None, {
  928
+                    'fields': ('url', 'title', 'content', 'sites')
  929
+                }),
  930
+                ('Advanced options', {
  931
+                    'classes': 'collapse',
  932
+                    'fields' : ('enable_comments', 'registration_required', 'template_name')
  933
+                }),
  934
+            )
933 935
 
934 936
     results in an admin that looks like:
935 937
 
@@ -978,8 +980,10 @@ Here's a list of all possible ``Admin`` options. No options are required. Adding
978 980
     Here's an example of how ``list_display`` and ``list_filter`` work (taken
979 981
     from the ``auth.user`` model)::
980 982
 
981  
-        list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff'),
982  
-        list_filter = ('is_staff', 'is_superuser'),
  983
+        class Admin:
  984
+            #...
  985
+            list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
  986
+            list_filter = ('is_staff', 'is_superuser')
983 987
 
984 988
     The above code results in an admin that looks like this:
985 989
 

0 notes on commit 1809f6e

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