Ticket #16218: ticket-16218.diff
File ticket-16218.diff, 1.3 KB (added by , 13 years ago) |
---|
-
tests/regressiontests/views/generic_urls.py
1 1 # -*- coding:utf-8 -*- 2 2 from django.conf.urls.defaults import patterns, url 3 from django.views.generic.dates import MonthArchiveView 3 4 4 5 from models import * 5 6 … … 45 46 (r'^date_based/archive_day/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$', 46 47 'archive_day', 47 48 numeric_days_info_dict), 49 ) 50 # class-based views 51 urlpatterns += patterns('', 48 52 (r'^date_based/archive_month/(?P<year>\d{4})/(?P<month>\d{1,2})/$', 49 'archive_month', 50 date_based_info_dict), 53 MonthArchiveView.as_view(model=Article, 54 date_field='date_created', 55 month_format='%m')), 51 56 (r'^date_based/datefield/archive_month/(?P<year>\d{4})/(?P<month>\d{1,2})/$', 52 'archive_month', 53 date_based_datefield_info_dict), 57 MonthArchiveView.as_view(model=DateArticle, 58 date_field='date_created', 59 month_format='%m')), 54 60 ) 55 61 56 62 # crud generic views.