Skip to content

Commit

Permalink
Fixed issues with definition of handler404 and handler500
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Joshua Cole committed Aug 17, 2017
1 parent 85eb85d commit ae4770d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions readthedocs/core/urls/subdomain.py
Expand Up @@ -10,14 +10,16 @@

from readthedocs.core.views.serve import (
redirect_page_with_filename,
redirect_project_slug,
serve_docs
redirect_project_slug, serve_docs
)
from readthedocs.core.views import (
server_error_500,
server_error_404,
)

from readthedocs.constants import pattern_opts

handler500 = 'readthedocs.core.views.server_error'
handler404 = 'readthedocs.core.views.server_error_404'
handler500 = server_error_500
handler404 = server_error_404

subdomain_urls = [
url(r'^(?:|projects/(?P<subproject_slug>{project_slug})/)'
Expand All @@ -33,8 +35,8 @@
r'(?P<lang_slug>{lang_slug})/'
r'(?P<version_slug>{version_slug})/'
r'(?P<filename>{filename_slug})$'.format(**pattern_opts)),
serve_docs,
name='docs_detail'),
serve_docs,
name='docs_detail'),
]

groups = [subdomain_urls]
Expand Down

0 comments on commit ae4770d

Please sign in to comment.