From 080278adea3be10c2b6b10e41f92e722d0c2c8cf Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 13 Dec 2010 14:43:13 -0600 Subject: Move news urls into own file Signed-off-by: Dan McGee --- news/urls.py | 14 ++++++++++++++ urls.py | 16 ++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 news/urls.py 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[-\w]+)/$', 'view'), + (r'^(?P[-\w]+)/edit/$', 'edit'), + (r'^(?P[-\w]+)/delete/$', 'delete'), + # old news URLs, permanent redirect view so we don't break all links + (r'^(?P\d+)/$', 'view_redirect'), +) + +# vim: set ts=4 sw=4 et: diff --git a/urls.py b/urls.py index 77bf8c1b..1e6f3204 100644 --- a/urls.py +++ b/urls.py @@ -69,17 +69,6 @@ (r'^todolists/$', 'public_list'), ) -urlpatterns += patterns('news.views', - (r'^news/add/$', 'add'), - (r'^news/preview/$', 'preview'), - # old news URLs, permanent redirect view so we don't break all links - (r'^news/(?P\d+)/$', 'view_redirect'), - (r'^news/(?P[-\w]+)/$', 'view'), - (r'^news/(?P[-\w]+)/edit/$', 'edit'), - (r'^news/(?P[-\w]+)/delete/$', 'delete'), - (r'^news/$', 'news_list', {}, 'news-list'), -) - urlpatterns += patterns('mirrors.views', (r'^mirrors/$', 'mirrors', {}, 'mirrors-list'), (r'^mirrors/(?P[\.\-\w]+)/$', 'mirror_details'), @@ -129,7 +118,7 @@ 'template_name': 'registration/logout.html'}), ) -# (mostly) Static Pages +# Public pages urlpatterns += patterns('public.views', (r'^$', 'index', {}, 'index'), (r'^about/$', direct_to_template, {'template': 'public/about.html'}, 'page-about'), @@ -142,9 +131,12 @@ (r'^download/$', 'download', {}, 'page-download'), ) +# Includes and other remaining stuff urlpatterns += patterns('', (r'^admin/', include(admin.site.urls)), (r'^jsi18n/$', 'django.views.i18n.null_javascript_catalog'), + + (r'^news/', include('news.urls')), ) if settings.DEBUG == True: -- cgit v1.2.3-54-g00ecf