Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #679 -- 'collapse' admin row class is now processed correctly w…

…hen more than one tuple is in the admin.fields list. Thanks, malcolm

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1008 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1ed99862c6215ddcd22b3e7797415afd8d49b8e0 1 parent e0d2793
@adrianholovaty adrianholovaty authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 django/contrib/admin/views/main.py
View
8 django/contrib/admin/views/main.py
@@ -556,14 +556,14 @@ def _get_template(opts, app_label, add=False, change=False, show_delete=False, f
if not seen_collapse and 'collapse' in options.get('classes', ''):
seen_collapse = True
javascript_imports.append('%sjs/admin/CollapsedFieldsets.js' % ADMIN_MEDIA_PREFIX)
- try:
- for field_list in options['fields']:
+ for field_list in options['fields']:
+ try:
for f in field_list:
if f.rel and isinstance(f, meta.ManyToManyField) and f.rel.filter_interface:
javascript_imports.extend(['%sjs/SelectBox.js' % ADMIN_MEDIA_PREFIX, '%sjs/SelectFilter2.js' % ADMIN_MEDIA_PREFIX])
raise StopIteration
- except StopIteration:
- break
+ except StopIteration:
+ break
for j in javascript_imports:
t.append('<script type="text/javascript" src="%s"></script>' % j)
Please sign in to comment.
Something went wrong with that request. Please try again.