All pastes #257795 Raw Edit

Stuff

public python v1 · immutable
#257795 ·published 2006-11-25 19:49 UTC
rendered paste body
from django.conf.urls.defaults import *from mysite.blog.models import Entryinfo_dict = {    'queryset': Entry.objects.all(),    'date_field': 'pub_date',}urlpatterns = patterns('django.views.generic.date_based',    #Blogs    (r'^blog/?$', 'archive_index', info_dict),    (r'^blog/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[-\w]+)/$', 'object_detail', dict(info_dict, slug_field='slug')),    (r'^blog/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/$', 'archive_day', info_dict),    (r'^blog/(?P<year>\d{4})/(?P<month>[a-z]{3})/$', 'archive_month', info_dict),    (r'^blog/(?P<year>\d{4})/$', 'archive_year', info_dict),    )