mirror of https://github.com/django/django.git
Fixed #7 -- Fixed subtle admin changelist filter bug in maintaining state. Thanks for the patch, Manuzhai!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@417 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9d8dd8610d
commit
8a9806096f
|
@ -230,7 +230,7 @@ def change_list(request, app_label, module_name):
|
|||
elif isinstance(f, meta.DateField):
|
||||
today = datetime.date.today()
|
||||
one_week_ago = today - datetime.timedelta(days=7)
|
||||
field_generic = '%s__' % field_name
|
||||
field_generic = '%s__' % f.name
|
||||
filter_template.append('<h3>By %s:</h3><ul>\n' % f.verbose_name)
|
||||
date_params = dict([(k, v) for k, v in params.items() if k.startswith(field_generic)])
|
||||
today_str = isinstance(f, meta.DateTimeField) and today.strftime('%Y-%m-%d 23:59:59') or today.strftime('%Y-%m-%d')
|
||||
|
|
Loading…
Reference in New Issue