1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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="/jrnl/%(slug)s/1/")),
url(r'', RedirectView.as_view(url="/jrnl/1/")),
)
|