diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-07-20 21:12:36 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-07-20 21:12:36 +0000 |
| commit | ee90b7cf9a166bbe2f7c5622e6ec080759e818ab (patch) | |
| tree | 3971be6fc9261a8170b222cb22e5214f5fb0d81d | |
| parent | c2ee295f502295ac8b53d6d31ad492e831d3519c (diff) | |
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.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8011 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/admin/options.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 501014a0d5..6b000ff97f 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -165,7 +165,7 @@ class BaseModelAdmin(object): 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. |
