Fix /404/ testing page
@@ -107,8 +107,14 @@ def server_error_500(request, template_name='500.html'):
return r
-def server_error_404(request, exception, template_name='404.html'): # pylint: disable=unused-argument # noqa
- """A simple 404 handler so we get media."""
+def server_error_404(request, exception=None, template_name='404.html'): # pylint: disable=unused-argument # noqa
+ """
+ A simple 404 handler so we get media.
+
+ .. note::
+
+ Marking exception as optional to make /404/ testing page to work.
+ """
response = get_redirect_response(request, path=request.get_full_path())
if response:
return response
