Ticket #7893: 7893.admin_doc.diff
File 7893.admin_doc.diff, 3.1 KB (added by , 16 years ago) |
---|
-
django/django/docs/admin.txt
106 106 107 107 The ``field_options`` dictionary can have the following keys: 108 108 109 ``fields`` 110 A tuple of field names to display in this fieldset. This key is required. 109 * ``fields`` 111 110 112 Example::111 A tuple of field names to display in this fieldset. This key is required. 113 112 114 { 115 'fields': ('first_name', 'last_name', 'address', 'city', 'state'), 116 } 113 Example:: 117 114 118 To display multiple fields on the same line, wrap those fields in their own119 tuple. In this example, the ``first_name`` and ``last_name`` fields will120 display on the same line::115 { 116 'fields': ('first_name', 'last_name', 'address', 'city', 'state'), 117 } 121 118 122 {123 'fields': (('first_name', 'last_name'), 'address', 'city', 'state'),124 }119 To display multiple fields on the same line, wrap those fields in their own 120 tuple. In this example, the ``first_name`` and ``last_name`` fields will 121 display on the same line:: 125 122 126 ``classes`` 127 A list containing extra CSS classes to apply to the fieldset. 123 { 124 'fields': (('first_name', 'last_name'), 'address', 'city', 'state'), 125 } 128 126 129 Example:: 127 * ``classes`` 128 129 A list containing extra CSS classes to apply to the fieldset. 130 130 131 { 132 'classes': ['wide', 'extrapretty'], 133 } 131 Example:: 134 132 135 Two useful classes defined by the default admin-site stylesheet are 136 ``collapse`` and ``wide``. Fieldsets with the ``collapse`` style will be 137 initially collapsed in the admin and replaced with a small "click to expand" 138 link. Fieldsets with the ``wide`` style will be given extra horizontal space. 133 { 134 'classes': ['wide', 'extrapretty'], 135 } 139 136 140 ``description`` 141 A string of optional extra text to be displayed at the top of each fieldset, 142 under the heading of the fieldset. 137 Two useful classes defined by the default admin-site stylesheet are 138 ``collapse`` and ``wide``. Fieldsets with the ``collapse`` style will be 139 initially collapsed in the admin and replaced with a small "click to expand" 140 link. Fieldsets with the ``wide`` style will be given extra horizontal space. 143 141 144 Note that this value is *not* HTML-escaped when it's displayed in 145 the admin interface. This lets you include HTML if you so desire. 146 Alternatively you can use plain text and 147 ``django.utils.html.escape()`` to escape any HTML special 148 characters. 142 * ``description`` 143 A string of optional extra text to be displayed at the top of each fieldset, 144 under the heading of the fieldset. 149 145 146 Note that this value is *not* HTML-escaped when it's displayed in 147 the admin interface. This lets you include HTML if you so desire. 148 Alternatively you can use plain text and 149 ``django.utils.html.escape()`` to escape any HTML special 150 characters. 151 150 152 ``filter_horizontal`` 151 153 ~~~~~~~~~~~~~~~~~~~~~ 152 154