diff options
author | Dan McGee <dan@archlinux.org> | 2010-12-13 14:56:43 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-12-13 14:56:43 -0600 |
commit | 6e3dc1be01ac0e5d0fb08142abfc1417eb924871 (patch) | |
tree | 4b320617813a94430c0f1e6ee195b95a86119cce | |
parent | 080278adea3be10c2b6b10e41f92e722d0c2c8cf (diff) |
Move more URLs out of root urlconf
Things are a bit cleaner now.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | devel/urls.py | 10 | ||||
-rw-r--r-- | packages/urls.py | 37 | ||||
-rw-r--r-- | todolists/urls.py | 13 | ||||
-rw-r--r-- | urls.py | 53 |
4 files changed, 64 insertions, 49 deletions
diff --git a/devel/urls.py b/devel/urls.py new file mode 100644 index 00000000..23dd2d9f --- /dev/null +++ b/devel/urls.py @@ -0,0 +1,10 @@ +from django.conf.urls.defaults import patterns + +urlpatterns = patterns('devel.views', + (r'^$', 'index'), + (r'^notify/$', 'change_notify'), + (r'^profile/$', 'change_profile'), + (r'^newuser/$', 'new_user_form'), +) + +# vim: set ts=4 sw=4 et: diff --git a/packages/urls.py b/packages/urls.py new file mode 100644 index 00000000..b3927677 --- /dev/null +++ b/packages/urls.py @@ -0,0 +1,37 @@ +from django.conf.urls.defaults import patterns + +urlpatterns = patterns('packages.views', + (r'^flaghelp/$', 'flaghelp'), + (r'^signoffs/$', 'signoffs'), + (r'^signoff_package/(?P<arch>[A-z0-9]+)/(?P<pkgname>[A-z0-9\-+.]+)/$', + 'signoff_package'), + (r'^update/$', 'update'), + + # Preference is for the non-search url below, but search is kept + # because other projects link to it + (r'^search/$', 'search'), + (r'^search/(?P<page>\d+)/$', 'search'), + (r'^$', 'search'), + (r'^(?P<page>\d+)/$', 'search'), + + (r'^differences/$', 'arch_differences'), + + (r'^(?P<name>[A-z0-9\-+.]+)/$', + 'details'), + (r'^(?P<repo>[A-z0-9\-]+)/(?P<name>[A-z0-9\-+.]+)/$', + 'details'), + (r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/$', + 'details'), + (r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/files/$', + 'files'), + (r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/maintainer/$', + 'getmaintainer'), + (r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/flag/$', + 'flag'), + (r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/unflag/$', + 'unflag'), + (r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/download/$', + 'download'), +) + +# vim: set ts=4 sw=4 et: diff --git a/todolists/urls.py b/todolists/urls.py new file mode 100644 index 00000000..187d4820 --- /dev/null +++ b/todolists/urls.py @@ -0,0 +1,13 @@ +from django.conf.urls.defaults import patterns + +urlpatterns = patterns('todolists.views', + (r'^$', 'list'), + (r'^(\d+)/$', 'view'), + (r'^add/$', 'add'), + (r'^edit/(?P<list_id>\d+)/$', 'edit'), + (r'^flag/(\d+)/(\d+)/$', 'flag'), + (r'^delete/(?P<object_id>\d+)/$', + 'delete_todolist'), +) + +# vim: set ts=4 sw=4 et: @@ -4,7 +4,6 @@ from django.contrib import admin from django.views.generic.simple import direct_to_template -from main.models import Todolist from feeds import PackageFeed, NewsFeed import sitemaps @@ -18,38 +17,6 @@ sitemaps = { admin.autodiscover() urlpatterns = patterns('packages.views', - (r'^packages/flaghelp/$', 'flaghelp'), - (r'^packages/signoffs/$', 'signoffs'), - (r'^packages/signoff_package/(?P<arch>[A-z0-9]+)/(?P<pkgname>[A-z0-9\-+.]+)/$', - 'signoff_package'), - (r'^packages/update/$', 'update'), - - # Preference is for the packages/ url below, but search is kept - # because other projects link to it - (r'^packages/search/$', 'search'), - (r'^packages/search/(?P<page>\d+)/$', 'search'), - (r'^packages/$', 'search'), - (r'^packages/(?P<page>\d+)/$', 'search'), - - (r'^packages/differences/$', 'arch_differences'), - - (r'^packages/(?P<name>[A-z0-9\-+.]+)/$', - 'details'), - (r'^packages/(?P<repo>[A-z0-9\-]+)/(?P<name>[A-z0-9\-+.]+)/$', - 'details'), - (r'^packages/(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/$', - 'details'), - (r'^packages/(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/files/$', - 'files'), - (r'^packages/(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/maintainer/$', - 'getmaintainer'), - (r'^packages/(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/flag/$', - 'flag'), - (r'^packages/(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/unflag/$', - 'unflag'), - (r'^packages/(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/download/$', - 'download'), - (r'^groups/$', 'groups'), (r'^groups/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/$', 'group_details'), @@ -58,14 +25,6 @@ urlpatterns = patterns('packages.views', ) urlpatterns += patterns('todolists.views', - (r'^todo/$', 'list'), - (r'^todo/(\d+)/$', 'view'), - (r'^todo/add/$', 'add'), - (r'^todo/edit/(?P<list_id>\d+)/$', 'edit'), - (r'^todo/flag/(\d+)/(\d+)/$', 'flag'), - (r'^todo/delete/(?P<object_id>\d+)/$', - 'delete_todolist'), - (r'^todolists/$', 'public_list'), ) @@ -84,13 +43,6 @@ urlpatterns += patterns('mirrors.views', {'countries': ['all'], 'protocols': ['http']}), ) -urlpatterns += patterns('devel.views', - (r'^devel/$', 'index'), - (r'^devel/notify/$', 'change_notify'), - (r'^devel/profile/$', 'change_profile'), - (r'^devel/newuser/$', 'new_user_form'), -) - # Feeds and sitemaps urlpatterns += patterns('', (r'^feeds/$', 'public.views.feeds', {}, 'feeds-list'), @@ -136,7 +88,10 @@ urlpatterns += patterns('', (r'^admin/', include(admin.site.urls)), (r'^jsi18n/$', 'django.views.i18n.null_javascript_catalog'), - (r'^news/', include('news.urls')), + (r'^devel/', include('devel.urls')), + (r'^news/', include('news.urls')), + (r'^packages/', include('packages.urls')), + (r'^todo/', include('todolists.urls')), ) if settings.DEBUG == True: |