diff 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
line wrap: on
line diff
--- a/gpp/news/urls.py	Sun Sep 12 18:30:23 2010 +0000
+++ b/gpp/news/urls.py	Wed Sep 15 00:14:54 2010 +0000
@@ -2,25 +2,18 @@
 from django.conf.urls.defaults import *
 
 urlpatterns = patterns('news.views',
-   url(r'^page/(?P<page>\d+)/$', 'index', name='news-index_page'),
-   url(r'^archive/$', 'archive_index', name='news-archive_index'),
-   url(r'^archive/(?P<year>\d{4})/(?P<month>\d\d?)/page/(?P<page>\d+)/$', 
-      'archive', 
-      name='news-archive_page'),
-   (r'^categories/$', 'category_index'),
-   (r'^category/(?P<category>\d+)/page/(?P<page>\d+)/$', 'category'),
-   (r'^email/(\d+)/$', 'email_story'),
-   (r'^email/thanks/$', 'email_thanks'),
-   url(r'^search/page/(?P<page>\d+)/$', 'search', name='news-search_page'),
-   (r'^story/(\d+)/$', 'story'),
-   (r'^submit/$', 'submit'),
-   (r'^submit/thanks/$', 'submit_thanks'),
-   url(r'^tags/$', 'tags', name='news-tag_index'),
-   url(r'^tag/(?P<tag_name>[^/]+)/page/(?P<page>\d+)/$', 
-      'tag', 
-      name='news-tag_page'),
+    url(r'^date/$', 'index', name='news-index_page'),
+    url(r'^archive/$', 'archive_index', name='news-archive_index'),
+    url(r'^archive/(?P<year>\d{4})/(?P<month>\d\d?)/$',
+        'archive', 
+        name='news-archive_page'),
+    url(r'^categories/$', 'category_index', name='news-category_index'),
+    url(r'^category/(?P<slug>[\w\d-]+)/$', 'category', name='news-category'),
+    url(r'^email/(\d+)/$', 'email_story', name='news-email_story'),
+    url(r'^email/thanks/$', 'email_thanks', name='news-email_thanks'),
+    url(r'^story/(\d+)/$', 'story', name='news-story'),
+    url(r'^submit/$', 'submit', name='news-submit'),
+    url(r'^submit/thanks/$', 'submit_thanks', name='news-submit_thanks'),
+    url(r'^tags/$', 'tags', name='news-tag_index'),
+    url(r'^tag/(?P<tag_name>[^/]+)/$', 'tag', name='news-tag_page'),
 )
-
-urlpatterns += patterns('django.views.generic.simple',
-   (r'^$', 'redirect_to', {'url': 'page/1/'}),
-)