Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #7 -- Fixed subtle admin changelist filter bug in maintaining s…

…tate. Thanks for the patch, Manuzhai!

git-svn-id: http://code.djangoproject.com/svn/django/trunk@417 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8a9806096fb36c2cd9df623c8d5d0fbc29a08b0d 1 parent 9d8dd86
Adrian Holovaty authored August 06, 2005

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/views/admin/main.py
2  django/views/admin/main.py
@@ -230,7 +230,7 @@ def change_list(request, app_label, module_name):
230 230
             elif isinstance(f, meta.DateField):
231 231
                 today = datetime.date.today()
232 232
                 one_week_ago = today - datetime.timedelta(days=7)
233  
-                field_generic = '%s__' % field_name
  233
+                field_generic = '%s__' % f.name
234 234
                 filter_template.append('<h3>By %s:</h3><ul>\n' % f.verbose_name)
235 235
                 date_params = dict([(k, v) for k, v in params.items() if k.startswith(field_generic)])
236 236
                 today_str = isinstance(f, meta.DateTimeField) and today.strftime('%Y-%m-%d 23:59:59') or today.strftime('%Y-%m-%d')

0 notes on commit 8a98060

Please sign in to comment.
Something went wrong with that request. Please try again.