Skip to content
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: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent e0d2793 commit 1ed99862c6215ddcd22b3e7797415afd8d49b8e0 @adrianholovaty adrianholovaty committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 django/contrib/admin/views/
8 django/contrib/admin/views/
@@ -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)

0 comments on commit 1ed9986

Please sign in to comment.
Something went wrong with that request. Please try again.