Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #285 from sampsyo/master

Add redirect to specific page in default language/version (#282)
  • Loading branch information...
commit b479f539abd941c34573184488ab63d7cdbe179f 2 parents e1cf690 + f78ab59
@ericholscher ericholscher authored
Showing with 13 additions and 1 deletion.
  1. +6 −0 readthedocs/core/subdomain_urls.py
  2. +7 −1 readthedocs/urls.py
View
6 readthedocs/core/subdomain_urls.py
@@ -15,6 +15,12 @@
'core.views.serve_docs',
name='docs_detail'
),
+ url(r'^page/(?P<filename>.*)$',
+ 'core.views.serve_docs',
+ {'version_slug': None,
+ 'lang_slug': None},
+ name='docs_detail'
+ ),
url(r'^(?P<lang_slug>\w{2})/(?P<version_slug>.*)/$',
'core.views.serve_docs',
{'filename': 'index.html'},
View
8 readthedocs/urls.py
@@ -34,7 +34,7 @@
name='docs_detail'
),
- #This is for redirecting /docs/pip/ -> /docs/pip/en/latest/
+ # Redirect to default version.
url(r'^docs/(?P<project_slug>[-\w]+)/$',
'core.views.serve_docs',
{'version_slug': None,
@@ -42,6 +42,12 @@
'filename': ''},
name='docs_detail'
),
+ url(r'^docs/(?P<project_slug>[-\w]+)/page/(?P<filename>.*)$',
+ 'core.views.serve_docs',
+ {'version_slug': None,
+ 'lang_slug': None},
+ name='docs_detail'
+ ),
#WTF are these both here?
#url(r'^docs/', include('projects.urls.public')),
Please sign in to comment.
Something went wrong with that request. Please try again.