Skip to content

Commit 94e0cd7

Browse files
committed
Fix /404/ testing page
1 parent 3c02f8f commit 94e0cd7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

readthedocs/core/views/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,14 @@ def server_error_500(request, template_name='500.html'):
107107
return r
108108

109109

110-
def server_error_404(request, exception, template_name='404.html'): # pylint: disable=unused-argument # noqa
111-
"""A simple 404 handler so we get media."""
110+
def server_error_404(request, exception=None, template_name='404.html'): # pylint: disable=unused-argument # noqa
111+
"""
112+
A simple 404 handler so we get media.
113+
114+
.. note::
115+
116+
Marking exception as optional to make /404/ testing page to work.
117+
"""
112118
response = get_redirect_response(request, path=request.get_full_path())
113119
if response:
114120
return response

0 commit comments

Comments
 (0)