Mercurial > public > sg101
comparison gpp/news/urls.py @ 240:1246a4f1ab4f
For #93: fix url scheme for the news application.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 15 Sep 2010 00:14:54 +0000 |
parents | dbd703f7d63a |
children | ddd69a8e07c7 |
comparison
equal
deleted
inserted
replaced
239:dcc929973bba | 240:1246a4f1ab4f |
---|---|
1 """urls for the News application""" | 1 """urls for the News application""" |
2 from django.conf.urls.defaults import * | 2 from django.conf.urls.defaults import * |
3 | 3 |
4 urlpatterns = patterns('news.views', | 4 urlpatterns = patterns('news.views', |
5 url(r'^page/(?P<page>\d+)/$', 'index', name='news-index_page'), | 5 url(r'^date/$', 'index', name='news-index_page'), |
6 url(r'^archive/$', 'archive_index', name='news-archive_index'), | 6 url(r'^archive/$', 'archive_index', name='news-archive_index'), |
7 url(r'^archive/(?P<year>\d{4})/(?P<month>\d\d?)/page/(?P<page>\d+)/$', | 7 url(r'^archive/(?P<year>\d{4})/(?P<month>\d\d?)/$', |
8 'archive', | 8 'archive', |
9 name='news-archive_page'), | 9 name='news-archive_page'), |
10 (r'^categories/$', 'category_index'), | 10 url(r'^categories/$', 'category_index', name='news-category_index'), |
11 (r'^category/(?P<category>\d+)/page/(?P<page>\d+)/$', 'category'), | 11 url(r'^category/(?P<slug>[\w\d-]+)/$', 'category', name='news-category'), |
12 (r'^email/(\d+)/$', 'email_story'), | 12 url(r'^email/(\d+)/$', 'email_story', name='news-email_story'), |
13 (r'^email/thanks/$', 'email_thanks'), | 13 url(r'^email/thanks/$', 'email_thanks', name='news-email_thanks'), |
14 url(r'^search/page/(?P<page>\d+)/$', 'search', name='news-search_page'), | 14 url(r'^story/(\d+)/$', 'story', name='news-story'), |
15 (r'^story/(\d+)/$', 'story'), | 15 url(r'^submit/$', 'submit', name='news-submit'), |
16 (r'^submit/$', 'submit'), | 16 url(r'^submit/thanks/$', 'submit_thanks', name='news-submit_thanks'), |
17 (r'^submit/thanks/$', 'submit_thanks'), | 17 url(r'^tags/$', 'tags', name='news-tag_index'), |
18 url(r'^tags/$', 'tags', name='news-tag_index'), | 18 url(r'^tag/(?P<tag_name>[^/]+)/$', 'tag', name='news-tag_page'), |
19 url(r'^tag/(?P<tag_name>[^/]+)/page/(?P<page>\d+)/$', | |
20 'tag', | |
21 name='news-tag_page'), | |
22 ) | 19 ) |
23 | |
24 urlpatterns += patterns('django.views.generic.simple', | |
25 (r'^$', 'redirect_to', {'url': 'page/1/'}), | |
26 ) |