Ticket #7893: 7893.admin_doc.diff

File 7893.admin_doc.diff, 3.1 KB (added by Julien Phalip, 16 years ago)

Using bullet points

  • django/django/docs/admin.txt

     
    106106
    107107The ``field_options`` dictionary can have the following keys:
    108108
    109 ``fields``
    110     A tuple of field names to display in this fieldset. This key is required.
     109 * ``fields``
    111110
    112     Example::
     111   A tuple of field names to display in this fieldset. This key is required.
    113112
    114         {
    115         'fields': ('first_name', 'last_name', 'address', 'city', 'state'),
    116         }
     113   Example::
    117114
    118     To display multiple fields on the same line, wrap those fields in their own
    119     tuple. In this example, the ``first_name`` and ``last_name`` fields will
    120     display on the same line::
     115       {
     116       'fields': ('first_name', 'last_name', 'address', 'city', 'state'),
     117       }
    121118
    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::
    125122
    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       }
    128126
    129     Example::
     127 * ``classes``
     128 
     129   A list containing extra CSS classes to apply to the fieldset.
    130130
    131         {
    132         'classes': ['wide', 'extrapretty'],
    133         }
     131   Example::
    134132
    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       }
    139136
    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.
    143141
    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.
    149145
     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
    150152``filter_horizontal``
    151153~~~~~~~~~~~~~~~~~~~~~
    152154
Back to Top