Ticket #1282: archive_today_new.diff
File archive_today_new.diff, 1.4 KB (added by , 17 years ago) |
---|
-
django/views/generic/date_based.py
274 274 c[key] = value 275 275 return HttpResponse(t.render(c), mimetype=mimetype) 276 276 277 def archive_today(request, **kwargs):277 def archive_today(request, month_format='%b', **kwargs): 278 278 """ 279 279 Generic daily archive view for today. Same as archive_day view. 280 280 """ 281 281 today = datetime.date.today() 282 282 kwargs.update({ 283 283 'year': str(today.year), 284 'month': today.strftime( '%b').lower(),284 'month': today.strftime(month_format).lower(), 285 285 'day': str(today.day), 286 'month_format': month_format, 286 287 }) 287 288 return archive_day(request, **kwargs) 288 289 -
tests/urls.py
5 5 (r'^test_client/', include('modeltests.test_client.urls')), 6 6 (r'^test_client_regress/', include('regressiontests.test_client_regress.urls')), 7 7 8 # Generic views urls 9 (r'^generic_views/', include('regressiontests.generic_views.urls')), 10 8 11 # Always provide the auth system login and logout views 9 12 (r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}), 10 13 (r'^accounts/logout/$', 'django.contrib.auth.views.logout'),