diff options
Diffstat (limited to 'apps/blog/urls.py')
-rw-r--r-- | apps/blog/urls.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/blog/urls.py b/apps/blog/urls.py new file mode 100644 index 0000000..57a3e7a --- /dev/null +++ b/apps/blog/urls.py @@ -0,0 +1,15 @@ +from django.conf.urls.defaults import * +from django.views.generic.list_detail import object_list +from django.views.generic.simple import redirect_to + +from blog.models import Entry + + + +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]+)/$', redirect_to, {'url': '/writing/%(slug)s/1/'}), + (r'', redirect_to, {'url': '/writing/1/'}), +) |