Skip to content

Commit ae4770d

Browse files
author
Joshua Cole
committed
Fixed issues with definition of handler404 and handler500
Django 1.10 wants urls to have the view they are passed as a callable. In addition, the view didn't define server_error, it only defined server_error_500. Switched to using that.
1 parent 85eb85d commit ae4770d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

readthedocs/core/urls/subdomain.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@
1010

1111
from readthedocs.core.views.serve import (
1212
redirect_page_with_filename,
13-
redirect_project_slug,
14-
serve_docs
13+
redirect_project_slug, serve_docs
14+
)
15+
from readthedocs.core.views import (
16+
server_error_500,
17+
server_error_404,
1518
)
16-
1719
from readthedocs.constants import pattern_opts
1820

19-
handler500 = 'readthedocs.core.views.server_error'
20-
handler404 = 'readthedocs.core.views.server_error_404'
21+
handler500 = server_error_500
22+
handler404 = server_error_404
2123

2224
subdomain_urls = [
2325
url(r'^(?:|projects/(?P<subproject_slug>{project_slug})/)'
@@ -33,8 +35,8 @@
3335
r'(?P<lang_slug>{lang_slug})/'
3436
r'(?P<version_slug>{version_slug})/'
3537
r'(?P<filename>{filename_slug})$'.format(**pattern_opts)),
36-
serve_docs,
37-
name='docs_detail'),
38+
serve_docs,
39+
name='docs_detail'),
3840
]
3941

4042
groups = [subdomain_urls]

0 commit comments

Comments
 (0)