Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

newforms-admin: Small unpacking improvement to ModelAdmin.get_field_s…

…ets()

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit eaf6d5161172af8b9304df36e5666124bc7d2973 1 parent 13da9d7
Adrian Holovaty adrianholovaty authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 django/contrib/admin/options.py
11 django/contrib/admin/options.py
View
@@ -120,12 +120,11 @@ def get_field_sets(self):
else:
field_struct = self.fields
new_fieldset_list = []
- for fieldset in field_struct:
- fs_options = fieldset[1]
- classes = fs_options.get('classes', ())
- description = fs_options.get('description', '')
- new_fieldset_list.append(AdminFieldSet(fieldset[0], classes,
- opts.get_field, fs_options['fields'], description))
+ for name, options in field_struct:
+ classes = options.get('classes', ())
+ description = options.get('description', '')
+ new_fieldset_list.append(AdminFieldSet(name, classes,
+ opts.get_field, options['fields'], description))
return new_fieldset_list
def has_add_permission(self, request):
Please sign in to comment.
Something went wrong with that request. Please try again.