1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #7602 -- Corrected lookup keyword arguments in archive_month and archive_week to properly range when date_field is from DateField. Thanks nullie for the original patch and Colin Grady for the test coverage.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8476 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Brian Rosner
2008-08-23 04:46:33 +00:00
parent 264771f1b6
commit a64dc39fb7
5 changed files with 101 additions and 61 deletions

View File

@@ -20,6 +20,7 @@ date_based_info_dict = {
'date_field': 'date_created',
'month_format': '%m',
}
date_based_datefield_info_dict = dict(date_based_info_dict, queryset=DateArticle.objects.all())
urlpatterns = patterns('',
(r'^$', views.index_page),
@@ -48,6 +49,9 @@ urlpatterns += patterns('django.views.generic.date_based',
(r'^date_based/archive_month/(?P<year>\d{4})/(?P<month>\d{1,2})/$',
'archive_month',
date_based_info_dict),
(r'^date_based/datefield/archive_month/(?P<year>\d{4})/(?P<month>\d{1,2})/$',
'archive_month',
date_based_datefield_info_dict),
)
# crud generic views.