Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored October 25, 2005

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  django/contrib/admin/views/main.py
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
556 556
         if not seen_collapse and 'collapse' in options.get('classes', ''):
557 557
             seen_collapse = True
558 558
             javascript_imports.append('%sjs/admin/CollapsedFieldsets.js' % ADMIN_MEDIA_PREFIX)
559  
-        try:
560  
-            for field_list in options['fields']:
  559
+        for field_list in options['fields']:
  560
+            try:
561 561
                 for f in field_list:
562 562
                     if f.rel and isinstance(f, meta.ManyToManyField) and f.rel.filter_interface:
563 563
                         javascript_imports.extend(['%sjs/SelectBox.js' % ADMIN_MEDIA_PREFIX, '%sjs/SelectFilter2.js' % ADMIN_MEDIA_PREFIX])
564 564
                         raise StopIteration
565  
-        except StopIteration:
566  
-            break
  565
+            except StopIteration:
  566
+                break
567 567
     for j in javascript_imports:
568 568
         t.append('<script type="text/javascript" src="%s"></script>' % j)
569 569
 

0 notes on commit 1ed9986

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