Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Move docs urls inside the docs app.

  • Loading branch information...
commit 0fd7006db661928676ec8b0547684b28d1a2b829 1 parent 46b8c6a
Aymeric Augustin authored February 09, 2013
52  django_docs/urls.py
... ...
@@ -1,53 +1,5 @@
1  
-from django.conf.urls import patterns, url
2  
-
3  
-from haystack.views import search_view_factory
4  
-
5  
-from docs import views
  1
+from django.conf.urls import patterns, url, include
6 2
 
7 3
 urlpatterns = patterns('',
8  
-    url(
9  
-        r'^$',
10  
-        views.index,
11  
-    ),
12  
-    url(
13  
-        r'^search/$',
14  
-        search_view_factory(view_class=views.DocSearchView),
15  
-        name='document-search'
16  
-    ),
17  
-    url(
18  
-        r'^(?P<lang>[a-z-]+)/$',
19  
-        views.language,
20  
-    ),
21  
-    url(
22  
-        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/$',
23  
-        views.document,
24  
-        {'url': ''},
25  
-        name='document-index',
26  
-    ),
27  
-    url(
28  
-        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_objects/$',
29  
-        views.objects_inventory,
30  
-        name='objects-inv',
31  
-    ),
32  
-    url(
33  
-        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_images/(?P<path>.*)$',
34  
-        views.SphinxStatic('_images'),
35  
-    ),
36  
-    url(
37  
-        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_source/(?P<path>.*)$',
38  
-        views.SphinxStatic('_sources'),
39  
-    ),
40  
-    url(
41  
-        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_downloads/(?P<path>.*)$',
42  
-        views.SphinxStatic('_downloads'),
43  
-    ),
44  
-    url(
45  
-        r'^(.*)/index/$',
46  
-        views.redirect_index,
47  
-    ),
48  
-    url(
49  
-        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/(?P<url>[\w./-]*)/$',
50  
-        views.document,
51  
-        name='document-detail',
52  
-    ),
  4
+    url(r'', include('docs.urls')),
53 5
 )
53  docs/urls.py
... ...
@@ -0,0 +1,53 @@
  1
+from django.conf.urls import patterns, url
  2
+
  3
+from haystack.views import search_view_factory
  4
+
  5
+from . import views
  6
+
  7
+urlpatterns = patterns('',
  8
+    url(
  9
+        r'^$',
  10
+        views.index,
  11
+    ),
  12
+    url(
  13
+        r'^search/$',
  14
+        search_view_factory(view_class=views.DocSearchView),
  15
+        name='document-search'
  16
+    ),
  17
+    url(
  18
+        r'^(?P<lang>[a-z-]+)/$',
  19
+        views.language,
  20
+    ),
  21
+    url(
  22
+        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/$',
  23
+        views.document,
  24
+        {'url': ''},
  25
+        name='document-index',
  26
+    ),
  27
+    url(
  28
+        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_objects/$',
  29
+        views.objects_inventory,
  30
+        name='objects-inv',
  31
+    ),
  32
+    url(
  33
+        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_images/(?P<path>.*)$',
  34
+        views.SphinxStatic('_images'),
  35
+    ),
  36
+    url(
  37
+        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_source/(?P<path>.*)$',
  38
+        views.SphinxStatic('_sources'),
  39
+    ),
  40
+    url(
  41
+        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_downloads/(?P<path>.*)$',
  42
+        views.SphinxStatic('_downloads'),
  43
+    ),
  44
+    url(
  45
+        r'^(.*)/index/$',
  46
+        views.redirect_index,
  47
+    ),
  48
+    url(
  49
+        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/(?P<url>[\w./-]*)/$',
  50
+        views.document,
  51
+        name='document-detail',
  52
+    ),
  53
+)

0 notes on commit 0fd7006

Please sign in to comment.
Something went wrong with that request. Please try again.