Ticket #7: filter.diff
File filter.diff, 798 bytes (added by , 19 years ago) |
---|
-
django/views/admin/main.py
233 233 elif isinstance(f, meta.DateField): 234 234 today = datetime.date.today() 235 235 one_week_ago = today - datetime.timedelta(days=7) 236 field_generic = '%s__' % f ield_name236 field_generic = '%s__' % f.name 237 237 filter_template.append('<h3>By %s:</h3><ul>\n' % f.verbose_name) 238 238 date_params = dict([(k, v) for k, v in params.items() if k.startswith(field_generic)]) 239 239 today_str = isinstance(f, meta.DateTimeField) and today.strftime('%Y-%m-%d 23:59:59') or today.strftime('%Y-%m-%d')