summaryrefslogtreecommitdiff
path: root/news/urls.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-12-13 14:43:13 -0600
committerDan McGee <dan@archlinux.org>2010-12-13 14:44:07 -0600
commit080278adea3be10c2b6b10e41f92e722d0c2c8cf (patch)
tree81c5e70a91990a49ce3802c6fe5f600a443ff4e9 /news/urls.py
parentd22c970f09fccdaefaa44ef71170a077c80bdc59 (diff)
Move news urls into own file
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'news/urls.py')
-rw-r--r--news/urls.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/news/urls.py b/news/urls.py
new file mode 100644
index 00000000..548d80ea
--- /dev/null
+++ b/news/urls.py
@@ -0,0 +1,14 @@
+from django.conf.urls.defaults import patterns
+
+urlpatterns = patterns('news.views',
+ (r'^$', 'news_list', {}, 'news-list'),
+ (r'^add/$', 'add'),
+ (r'^preview/$', 'preview'),
+ (r'^(?P<slug>[-\w]+)/$', 'view'),
+ (r'^(?P<slug>[-\w]+)/edit/$', 'edit'),
+ (r'^(?P<slug>[-\w]+)/delete/$', 'delete'),
+ # old news URLs, permanent redirect view so we don't break all links
+ (r'^(?P<object_id>\d+)/$', 'view_redirect'),
+)
+
+# vim: set ts=4 sw=4 et: