mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
newforms-admin: Fixed bug in the way fieldsets() determined the field classes from self.fields
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4377 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
dd2f22faad
commit
9fb548fdcd
@ -202,7 +202,7 @@ class ModelAdmin(object):
|
|||||||
yield Fieldset(fields=default_fields)
|
yield Fieldset(fields=default_fields)
|
||||||
else:
|
else:
|
||||||
for name, options in self.fields:
|
for name, options in self.fields:
|
||||||
yield Fieldset(name, options['fields'], classes=options.get('classes', ()), description=options.get('description'))
|
yield Fieldset(name, options['fields'], classes=options.get('classes', '').split(' '), description=options.get('description'))
|
||||||
|
|
||||||
def fieldsets_add(self, request):
|
def fieldsets_add(self, request):
|
||||||
"Hook for specifying Fieldsets for the add form."
|
"Hook for specifying Fieldsets for the add form."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user