diff options
| author | Brian Rosner <brosner@gmail.com> | 2008-08-29 17:02:06 +0000 |
|---|---|---|
| committer | Brian Rosner <brosner@gmail.com> | 2008-08-29 17:02:06 +0000 |
| commit | c113133daddacb7abde8e5e6514d0d7871d9f1d6 (patch) | |
| tree | d8f2eaa0f3d6ae78baed8eeaf141d499fd990293 /docs/ref | |
| parent | 6a8dcafb575c3b0147223c04e7ccae553c0c9a49 (diff) | |
Fixed #7893 -- Gave `fieldsets` dictionary options a better visual display to set aside from other options in the ModelAdmin due to some name clashing causing confusion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/admin.txt | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/docs/ref/contrib/admin.txt b/docs/ref/contrib/admin.txt index e7e55fbc82..06e45f6bf6 100644 --- a/docs/ref/contrib/admin.txt +++ b/docs/ref/contrib/admin.txt @@ -118,46 +118,48 @@ in the same order as the fields are defined in the model. The ``field_options`` dictionary can have the following keys: -``fields`` - A tuple of field names to display in this fieldset. This key is required. - - Example:: - - { - 'fields': ('first_name', 'last_name', 'address', 'city', 'state'), - } - - To display multiple fields on the same line, wrap those fields in their own - tuple. In this example, the ``first_name`` and ``last_name`` fields will - display on the same line:: - - { - 'fields': (('first_name', 'last_name'), 'address', 'city', 'state'), - } - -``classes`` - A list containing extra CSS classes to apply to the fieldset. + * ``fields`` + A tuple of field names to display in this fieldset. This key is + required. + + Example:: + + { + 'fields': ('first_name', 'last_name', 'address', 'city', 'state'), + } + + To display multiple fields on the same line, wrap those fields in + their own tuple. In this example, the ``first_name`` and ``last_name`` + fields will display on the same line:: - Example:: + { + 'fields': (('first_name', 'last_name'), 'address', 'city', 'state'), + } - { - 'classes': ['wide', 'extrapretty'], - } + * ``classes`` + A list containing extra CSS classes to apply to the fieldset. + + 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" - link. Fieldsets with the ``wide`` style will be given extra horizontal space. + 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" link. Fieldsets with the ``wide`` style will be + given extra horizontal space. -``description`` - A string of optional extra text to be displayed at the top of each fieldset, - under the heading of the fieldset. + * ``description`` + A string of optional extra text to be displayed at the top of each + fieldset, under the heading of the fieldset. - Note that this value is *not* HTML-escaped when it's displayed in - the admin interface. This lets you include HTML if you so desire. - Alternatively you can use plain text and - ``django.utils.html.escape()`` to escape any HTML special - characters. + Note that this value is *not* HTML-escaped when it's displayed in + the admin interface. This lets you include HTML if you so desire. + Alternatively you can use plain text and + ``django.utils.html.escape()`` to escape any HTML special + characters. ``fields`` ~~~~~~~~~~ |
