diff options
author | Mike Crute <mcrute@gmail.com> | 2010-05-27 00:34:53 -0400 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2010-05-27 00:34:53 -0400 |
commit | 93481083e6fa15490584e61a3f6a5638024f9b31 (patch) | |
tree | 5190236c0f91ce1345e58b88a72e7788aa0ace1b | |
parent | 4fa9ec2ff7f75a64e37aff7cd61b707c2585654b (diff) | |
download | chishop-93481083e6fa15490584e61a3f6a5638024f9b31.tar.bz2 chishop-93481083e6fa15490584e61a3f6a5638024f9b31.tar.xz chishop-93481083e6fa15490584e61a3f6a5638024f9b31.zip |
Extracting urlconfs into a simple hierarchy for future sanity.
-rw-r--r-- | djangopypi/urls.py | 24 | ||||
-rw-r--r-- | djangopypi/urls/__init__.py | 15 | ||||
-rw-r--r-- | djangopypi/urls/simple.py | 12 |
3 files changed, 27 insertions, 24 deletions
diff --git a/djangopypi/urls.py b/djangopypi/urls.py deleted file mode 100644 index 79b16be..0000000 --- a/djangopypi/urls.py +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | from django.conf.urls.defaults import patterns, url, include | ||
3 | |||
4 | urlpatterns = patterns("djangopypi.views", | ||
5 | # Simple PyPI | ||
6 | url(r'^simple/$', "simple", | ||
7 | name="djangopypi-simple"), | ||
8 | |||
9 | url(r'^simple/(?P<dist_name>[\w\d_\.\-]+)/(?P<version>[\w\.\d\-_]+)/$', | ||
10 | "show_version", | ||
11 | name="djangopypi-show_version"), | ||
12 | |||
13 | url(r'^simple/(?P<dist_name>[\w\d_\.\-]+)/$', "show_links", | ||
14 | name="djangopypi-show_links"), | ||
15 | |||
16 | url(r'^$', "simple", {'template_name': 'djangopypi/pypi.html'}, | ||
17 | name="djangopypi-pypi"), | ||
18 | |||
19 | url(r'^(?P<dist_name>[\w\d_\.\-]+)/$', "show_links", | ||
20 | {'template_name': 'djangopypi/pypi_show_links.html'}, | ||
21 | name="djangopypi-pypi_show_links"), | ||
22 | |||
23 | url(r'^search','search',name='djangopypi-search') | ||
24 | ) \ No newline at end of file | ||
diff --git a/djangopypi/urls/__init__.py b/djangopypi/urls/__init__.py new file mode 100644 index 0000000..e362edc --- /dev/null +++ b/djangopypi/urls/__init__.py | |||
@@ -0,0 +1,15 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | from django.conf.urls.defaults import patterns, include | ||
3 | |||
4 | urlpatterns = patterns('djangopypi.views', | ||
5 | (r'^simple/', include('djangopypi.urls.simple')), | ||
6 | |||
7 | (r'^$', 'simple', {'template_name': 'djangopypi/pypi.html'}, | ||
8 | 'djangopypi-pypi'), | ||
9 | |||
10 | (r'^(?P<dist_name>[\w\d_\.\-]+)/$', 'show_links', | ||
11 | {'template_name': 'djangopypi/pypi_show_links.html'}, | ||
12 | 'djangopypi-pypi_show_links'), | ||
13 | |||
14 | (r'^search', 'search', {}, 'djangopypi-search'), | ||
15 | ) | ||
diff --git a/djangopypi/urls/simple.py b/djangopypi/urls/simple.py new file mode 100644 index 0000000..21d3b78 --- /dev/null +++ b/djangopypi/urls/simple.py | |||
@@ -0,0 +1,12 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | from django.conf.urls.defaults import patterns | ||
3 | |||
4 | urlpatterns = patterns('djangopypi.views', | ||
5 | (r'^$', 'simple', {}, 'djangopypi-simple'), | ||
6 | |||
7 | (r'^(?P<dist_name>[\w\d_\.\-]+)/(?P<version>[\w\.\d\-_]+)/$', | ||
8 | 'show_version', {}, 'djangopypi-show_version'), | ||
9 | |||
10 | (r'^(?P<dist_name>[\w\d_\.\-]+)/$', 'show_links', {}, | ||
11 | 'djangopypi-show_links'), | ||
12 | ) | ||