Author: mtredinnick
Date: 2008-07-20 16:12:36 -0500 (Sun, 20 Jul 2008)
New Revision: 8011

Modified:
   django/trunk/django/contrib/admin/options.py
Log:
Fixed filter_horizontal and filter_vertical handling in admin so that they can
be lists (aren't required to be tuples). It's less error-prone to use one item
lists than one-tuples, but this caused a crash.


Modified: django/trunk/django/contrib/admin/options.py
===================================================================
--- django/trunk/django/contrib/admin/options.py        2008-07-20 18:20:54 UTC 
(rev 8010)
+++ django/trunk/django/contrib/admin/options.py        2008-07-20 21:12:36 UTC 
(rev 8011)
@@ -165,7 +165,7 @@
                     if db_field.name in self.raw_id_fields:
                         kwargs['widget'] = 
widgets.ManyToManyRawIdWidget(db_field.rel)
                         kwargs['help_text'] = ''
-                    elif db_field.name in (self.filter_vertical + 
self.filter_horizontal):
+                    elif db_field.name in (list(self.filter_vertical) + 
list(self.filter_horizontal)):
                         kwargs['widget'] = 
widgets.FilteredSelectMultiple(db_field.verbose_name, (db_field.name in 
self.filter_vertical))
             # Wrap the widget's render() method with a method that adds
             # extra HTML to the end of the rendered output.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to