Updated ExceptionViews handles

Added additional 'exception' parameter to function headers.
Disabled pylint warnings for missing docstring and unused arguments.
This commit is contained in:
usama sadiq
2020-01-09 15:40:55 +05:00
committed by usamasadiq
parent 7a7ed99a73
commit 720dcb6c3a
2 changed files with 5 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ def jsonable_error(status=500, message="The Studio servers encountered an error"
@jsonable_error(404, "Resource not found")
def not_found(request):
def not_found(request, exception):
return render_to_response('error.html', {'error': '404'})
@@ -42,7 +42,7 @@ def server_error(request):
@fix_crum_request
@jsonable_error(404, "Resource not found")
def render_404(request):
def render_404(request, exception):
return HttpResponseNotFound(render_to_string('404.html', {}, request=request))

View File

@@ -1,3 +1,5 @@
# pylint: disable=missing-docstring,unused-argument
# View for semi-static templatized content.
#
# List of valid templates is explicitly managed for (short-term)
@@ -91,7 +93,7 @@ def render_press_release(request, slug):
@fix_crum_request
def render_404(request):
def render_404(request, exception):
return HttpResponseNotFound(render_to_string('static_templates/404.html', {}, request=request))