Ticket #7839: 7839.diff

File 7839.diff, 1.8 KB (added by Jan Rademaker <j.rademaker@…>, 7 years ago)
  • docs/tutorial02.txt

     
    192192        class PollAdmin(admin.ModelAdmin):
    193193            fieldsets = [
    194194                (None,               {'fields': ['question']}),
    195                 ('Date information', {'fields': ['pub_date'], 'classes': 'pub_date'}),
     195                ('Date information', {'fields': ['pub_date'], 'classes': ['pub_date']}),
    196196            ]
    197197
    198198.. image:: http://media.djangoproject.com/img/doc/tutorial-trunk/admin09.png
     
    242242    class PollAdmin(admin.ModelAdmin):
    243243        fieldsets = [
    244244            (None,               {'fields': ['question']}),
    245             ('Date information', {'fields': ['pub_date'], 'classes': 'pub_date'}),
     245            ('Date information', {'fields': ['pub_date'], 'classes': ['pub_date']}),
    246246        ]
    247247        inlines = [ChoiceInline]
    248248
  • docs/admin.txt

     
    122122        }
    123123
    124124``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.
    126126   
    127127    Example::
    128128       
    129129        {
    130         'classes': 'wide',
     130        'classes': ['wide', 'extrapretty'],
    131131        }
    132132
    133     Apply multiple classes by separating them with spaces. Example::
    134        
    135         {
    136         'classes': 'wide extrapretty',
    137         }
    138    
    139133    Two useful classes defined by the default admin-site stylesheet are
    140134    ``collapse`` and ``wide``. Fieldsets with the ``collapse`` style will be
    141135    initially collapsed in the admin and replaced with a small "click to expand"
Back to Top