from django.conf.urls import * from django.views.generic.base import RedirectView """ urlpatterns = patterns('', (r'(?P<slug>[-\w]+)/(?P<page>\d+)/$', 'blog.views.entry_list_by_area'), (r'(?P<page>\d+)/$', 'blog.views.entry_list'), (r'(?P<slug>[-\w]+)/$', RedirectView.as_view(url="/writing/%(slug)s/1/")), (r'', RedirectView.as_view(url="/writing/1/")), ) """ urlpatterns = patterns('', url(r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+)$', 'blog.views.entry_detail'), #url(r'(?P<year>\d{4})/(?P<month>\d{2})/$', 'blog.views.date_list', name="blog_by_month"), #url(r'(?P<year>\d{4})/$', 'blog.views.date_list', name="blog_by_year"), (r'(?P<slug>[-\w]+)/(?P<page>\d+)/$', 'blog.views.entry_list_by_area'), (r'(?P<page>\d+)/$', 'blog.views.entry_list'), url(r'(?P<slug>[-\w]+)/$', RedirectView.as_view(url="/writing/%(slug)s/1/")), #url(r'', RedirectView.as_view(url="/writing/1/")), )