Fixed typos in admin views wrt list_filter. Refs #16311.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
43503b093a
commit
e3a845de6a
|
@ -91,21 +91,21 @@ class ChangeList(object):
|
||||||
filter_specs = []
|
filter_specs = []
|
||||||
cleaned_params, use_distinct = self.get_lookup_params(use_distinct)
|
cleaned_params, use_distinct = self.get_lookup_params(use_distinct)
|
||||||
if self.list_filter:
|
if self.list_filter:
|
||||||
for list_filer in self.list_filter:
|
for list_filter in self.list_filter:
|
||||||
if callable(list_filer):
|
if callable(list_filter):
|
||||||
# This is simply a custom list filter class.
|
# This is simply a custom list filter class.
|
||||||
spec = list_filer(request, cleaned_params,
|
spec = list_filter(request, cleaned_params,
|
||||||
self.model, self.model_admin)
|
self.model, self.model_admin)
|
||||||
else:
|
else:
|
||||||
field_path = None
|
field_path = None
|
||||||
if isinstance(list_filer, (tuple, list)):
|
if isinstance(list_filter, (tuple, list)):
|
||||||
# This is a custom FieldListFilter class for a given field.
|
# This is a custom FieldListFilter class for a given field.
|
||||||
field, field_list_filter_class = list_filer
|
field, field_list_filter_class = list_filter
|
||||||
else:
|
else:
|
||||||
# This is simply a field name, so use the default
|
# This is simply a field name, so use the default
|
||||||
# FieldListFilter class that has been registered for
|
# FieldListFilter class that has been registered for
|
||||||
# the type of the given field.
|
# the type of the given field.
|
||||||
field, field_list_filter_class = list_filer, FieldListFilter.create
|
field, field_list_filter_class = list_filter, FieldListFilter.create
|
||||||
if not isinstance(field, models.Field):
|
if not isinstance(field, models.Field):
|
||||||
field_path = field
|
field_path = field
|
||||||
field = get_fields_from_path(self.model, field_path)[-1]
|
field = get_fields_from_path(self.model, field_path)[-1]
|
||||||
|
|
Loading…
Reference in New Issue