summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBrian Rosner <brosner@gmail.com>2008-07-19 15:37:28 +0000
committerBrian Rosner <brosner@gmail.com>2008-07-19 15:37:28 +0000
commit4729e3836eb48a39bc58b0daeaa71d6d9ea1349d (patch)
treeee6d99de6a144439164e24ae11f24972786f8d01 /docs
parentdce4db49a750cdde81d406d8e005df08dc7ecd6e (diff)
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
Diffstat (limited to 'docs')
-rw-r--r--docs/admin.txt10
-rw-r--r--docs/tutorial02.txt4
2 files changed, 4 insertions, 10 deletions
diff --git a/docs/admin.txt b/docs/admin.txt
index fbdd19bc90..2eeaa64628 100644
--- a/docs/admin.txt
+++ b/docs/admin.txt
@@ -122,20 +122,14 @@ The ``field_options`` dictionary can have the following keys:
}
``classes``
- A string containing extra CSS classes to apply to the fieldset.
+ A list containing extra CSS classes to apply to the fieldset.
Example::
{
- 'classes': 'wide',
+ 'classes': ['wide', 'extrapretty'],
}
- Apply multiple classes by separating them with spaces. Example::
-
- {
- 'classes': 'wide extrapretty',
- }
-
Two useful classes defined by the default admin-site stylesheet are
``collapse`` and ``wide``. Fieldsets with the ``collapse`` style will be
initially collapsed in the admin and replaced with a small "click to expand"
diff --git a/docs/tutorial02.txt b/docs/tutorial02.txt
index c69fd1459f..5f06dde962 100644
--- a/docs/tutorial02.txt
+++ b/docs/tutorial02.txt
@@ -192,7 +192,7 @@ aren't commonly used::
class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
- ('Date information', {'fields': ['pub_date'], 'classes': 'pub_date'}),
+ ('Date information', {'fields': ['pub_date'], 'classes': ['pub_date']}),
]
.. image:: http://media.djangoproject.com/img/doc/tutorial-trunk/admin09.png
@@ -242,7 +242,7 @@ registration code to read::
class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
- ('Date information', {'fields': ['pub_date'], 'classes': 'pub_date'}),
+ ('Date information', {'fields': ['pub_date'], 'classes': ['pub_date']}),
]
inlines = [ChoiceInline]