Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add 500 view.

  • Loading branch information...
commit 6c000c31b9fda4d20b2e8449d06c06f135812a25 1 parent 418ed87
@ericholscher ericholscher authored
Showing with 4 additions and 0 deletions.
  1. +3 −0  readthedocs/core/views.py
  2. +1 −0  readthedocs/urls.py
View
3  readthedocs/core/views.py
@@ -340,6 +340,9 @@ def server_error_404(request, template_name='404.html'):
r.status_code = 404
return r
+def divide_by_zero(request):
+ return 1 / 0
+
def morelikethis(request, project_slug, filename):
project = get_object_or_404(Project, slug=project_slug)
file = get_object_or_404(ImportedFile, project=project, path=filename)
View
1  readthedocs/urls.py
@@ -66,6 +66,7 @@
url(r'^random/$', 'core.views.random_page', name='random_page'),
url(r'^depth/$', 'core.views.queue_depth', name='queue_depth'),
url(r'^live/$', 'core.views.live_builds', name='live_builds'),
+ url(r'^500/$', 'core.views.divide_by_zero', name='divide_by_zero'),
url(r'^filter/version/$',
'django_filters.views.object_filter',
{ 'filter_class': VersionFilter, 'template_name': 'filter.html' },
Please sign in to comment.
Something went wrong with that request. Please try again.