1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Fixed #2342 -- Made small fix to DateFieldFilterSpec. Thanks, Alex Dedul

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-07-20 20:31:59 +00:00
parent c19ef69c5c
commit b26331d6ee

View File

@ -123,7 +123,7 @@ class DateFieldFilterSpec(FilterSpec):
def choices(self, cl):
for title, param_dict in self.links:
yield {'selected': self.date_params == param_dict,
'query_string': cl.get_query_string(param_dict, self.field_generic),
'query_string': cl.get_query_string(param_dict, [self.field_generic]),
'display': title}
FilterSpec.register(lambda f: isinstance(f, models.DateField), DateFieldFilterSpec)