diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-01-30 04:13:00 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-01-30 04:13:00 +0000 |
| commit | b4af15e66cd8e07ee2ac619c2a8816218ec9b687 (patch) | |
| tree | 67581e8af740b51a3c727d428394bc10f0058ddd | |
| parent | ee350b09dd7890ddc58bd86c5972549e11285324 (diff) | |
Made small improvement to function_get_date_list
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/meta/__init__.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/django/core/meta/__init__.py b/django/core/meta/__init__.py index e458ba2272..e9200d9a64 100644 --- a/django/core/meta/__init__.py +++ b/django/core/meta/__init__.py @@ -1665,10 +1665,7 @@ def function_get_date_list(opts, field, *args, **kwargs): from django.core.db.typecasts import typecast_timestamp kind = args and args[0] or kwargs['kind'] assert kind in ("month", "year", "day"), "'kind' must be one of 'year', 'month' or 'day'." - order = 'ASC' - if kwargs.has_key('_order'): - order = kwargs['_order'] - del kwargs['_order'] + order = kwargs.pop('_order', 'ASC') assert order in ('ASC', 'DESC'), "'order' must be either 'ASC' or 'DESC'" kwargs['order_by'] = [] # Clear this because it'll mess things up otherwise. if field.null: |
