Updated ExceptionViews handles
Added additional 'exception' parameter to function headers. Disabled pylint warnings for missing docstring and unused arguments.
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user