From b9fdcd06222c674d5fabcf5a4ab6bc55f268c757 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 22 Feb 2011 15:29:08 -0600 Subject: Modularize URLs Make some additional URL config files that can be included so we aren't trying to do so much in the top level config. This also allows us to branch a bit more rather than go linear down the rather lengthy list. Signed-off-by: Dan McGee --- mirrors/urls.py | 10 ++++++++++ mirrors/urls_mirrorlist.py | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 mirrors/urls.py create mode 100644 mirrors/urls_mirrorlist.py (limited to 'mirrors') diff --git a/mirrors/urls.py b/mirrors/urls.py new file mode 100644 index 00000000..fed9c807 --- /dev/null +++ b/mirrors/urls.py @@ -0,0 +1,10 @@ +from django.conf.urls.defaults import patterns + +urlpatterns = patterns('mirrors.views', + (r'^$', 'mirrors', {}, 'mirror-list'), + (r'^status/$', 'status', {}, 'mirror-status'), + (r'^status/json/$', 'status_json', {}, 'mirror-status-json'), + (r'^(?P[\.\-\w]+)/$', 'mirror_details'), +) + +# vim: set ts=4 sw=4 et: diff --git a/mirrors/urls_mirrorlist.py b/mirrors/urls_mirrorlist.py new file mode 100644 index 00000000..70bc18d2 --- /dev/null +++ b/mirrors/urls_mirrorlist.py @@ -0,0 +1,12 @@ +from django.conf.urls.defaults import patterns + +urlpatterns = patterns('mirrors.views', + (r'^$', 'generate_mirrorlist', {}, 'mirrorlist'), + (r'^all/$', 'find_mirrors', {'countries': ['all']}), + (r'^all/ftp/$', 'find_mirrors', + {'countries': ['all'], 'protocols': ['ftp']}), + (r'^all/http/$', 'find_mirrors', + {'countries': ['all'], 'protocols': ['http']}), +) + +# vim: set ts=4 sw=4 et: -- cgit v1.2.3-54-g00ecf