Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #7839 -- Corrected admin documentation and tutorial to reflect …

…that 'classes' should be a list and not a string. Thanks Jan Rademaker for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4729e3836eb48a39bc58b0daeaa71d6d9ea1349d 1 parent dce4db4
Brian Rosner authored July 19, 2008
10  docs/admin.txt
@@ -122,20 +122,14 @@ The ``field_options`` dictionary can have the following keys:
122 122
         }
123 123
 
124 124
 ``classes``
125  
-    A string containing extra CSS classes to apply to the fieldset.
  125
+    A list containing extra CSS classes to apply to the fieldset.
126 126
     
127 127
     Example::
128 128
         
129 129
         {
130  
-        'classes': 'wide',
  130
+        'classes': ['wide', 'extrapretty'],
131 131
         }
132 132
 
133  
-    Apply multiple classes by separating them with spaces. Example::
134  
-        
135  
-        {
136  
-        'classes': 'wide extrapretty',
137  
-        }
138  
-    
139 133
     Two useful classes defined by the default admin-site stylesheet are
140 134
     ``collapse`` and ``wide``. Fieldsets with the ``collapse`` style will be
141 135
     initially collapsed in the admin and replaced with a small "click to expand"
4  docs/tutorial02.txt
@@ -192,7 +192,7 @@ aren't commonly used::
192 192
         class PollAdmin(admin.ModelAdmin):
193 193
             fieldsets = [
194 194
                 (None,               {'fields': ['question']}),
195  
-                ('Date information', {'fields': ['pub_date'], 'classes': 'pub_date'}),
  195
+                ('Date information', {'fields': ['pub_date'], 'classes': ['pub_date']}),
196 196
             ]
197 197
 
198 198
 .. image:: http://media.djangoproject.com/img/doc/tutorial-trunk/admin09.png
@@ -242,7 +242,7 @@ registration code to read::
242 242
     class PollAdmin(admin.ModelAdmin):
243 243
         fieldsets = [
244 244
             (None,               {'fields': ['question']}),
245  
-            ('Date information', {'fields': ['pub_date'], 'classes': 'pub_date'}),
  245
+            ('Date information', {'fields': ['pub_date'], 'classes': ['pub_date']}),
246 246
         ]
247 247
         inlines = [ChoiceInline]
248 248
 

0 notes on commit 4729e38

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