Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move docs urls inside the docs app.

  • Loading branch information...
commit 0fd7006db661928676ec8b0547684b28d1a2b829 1 parent 46b8c6a
@aaugustin aaugustin authored
Showing with 55 additions and 50 deletions.
  1. +2 −50 django_docs/urls.py
  2. +53 −0 docs/urls.py
View
52 django_docs/urls.py
@@ -1,53 +1,5 @@
-from django.conf.urls import patterns, url
-
-from haystack.views import search_view_factory
-
-from docs import views
+from django.conf.urls import patterns, url, include
urlpatterns = patterns('',
- url(
- r'^$',
- views.index,
- ),
- url(
- r'^search/$',
- search_view_factory(view_class=views.DocSearchView),
- name='document-search'
- ),
- url(
- r'^(?P<lang>[a-z-]+)/$',
- views.language,
- ),
- url(
- r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/$',
- views.document,
- {'url': ''},
- name='document-index',
- ),
- url(
- r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_objects/$',
- views.objects_inventory,
- name='objects-inv',
- ),
- url(
- r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_images/(?P<path>.*)$',
- views.SphinxStatic('_images'),
- ),
- url(
- r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_source/(?P<path>.*)$',
- views.SphinxStatic('_sources'),
- ),
- url(
- r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_downloads/(?P<path>.*)$',
- views.SphinxStatic('_downloads'),
- ),
- url(
- r'^(.*)/index/$',
- views.redirect_index,
- ),
- url(
- r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/(?P<url>[\w./-]*)/$',
- views.document,
- name='document-detail',
- ),
+ url(r'', include('docs.urls')),
)
View
53 docs/urls.py
@@ -0,0 +1,53 @@
+from django.conf.urls import patterns, url
+
+from haystack.views import search_view_factory
+
+from . import views
+
+urlpatterns = patterns('',
+ url(
+ r'^$',
+ views.index,
+ ),
+ url(
+ r'^search/$',
+ search_view_factory(view_class=views.DocSearchView),
+ name='document-search'
+ ),
+ url(
+ r'^(?P<lang>[a-z-]+)/$',
+ views.language,
+ ),
+ url(
+ r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/$',
+ views.document,
+ {'url': ''},
+ name='document-index',
+ ),
+ url(
+ r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_objects/$',
+ views.objects_inventory,
+ name='objects-inv',
+ ),
+ url(
+ r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_images/(?P<path>.*)$',
+ views.SphinxStatic('_images'),
+ ),
+ url(
+ r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_source/(?P<path>.*)$',
+ views.SphinxStatic('_sources'),
+ ),
+ url(
+ r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_downloads/(?P<path>.*)$',
+ views.SphinxStatic('_downloads'),
+ ),
+ url(
+ r'^(.*)/index/$',
+ views.redirect_index,
+ ),
+ url(
+ r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/(?P<url>[\w./-]*)/$',
+ views.document,
+ name='document-detail',
+ ),
+)
Please sign in to comment.
Something went wrong with that request. Please try again.