diff --git a/basics/views.py b/basics/views.py index 83e2f45..8d82a38 100644 --- a/basics/views.py +++ b/basics/views.py @@ -15,13 +15,17 @@ def disclaimer(request): return render(request, 'basics/disclaimer.html', {}) def notfound(request): - return render(request, 'basics/notfound.html', {}) + body = render_to_string('basics/notfound.html', {}) + return HttpResponse(body, status_code = 404) def serverror(request): - return render(request, 'basics/serverror.html', {}) + body = render_to_string('basics/serverror.html', {}) + return HttpResponse(body, status_code = 500) def forbidden(request): - return render(request, 'basics/forbidden.html', {}) + body = render_to_string('basics/forbidden.html', {}) + return HttpResponse(body, status_code = 403) def badrequest(request): - return render(request, 'basics/badrequest.html', {}) + body = render_to_string('basics/badrequest.html', {}) + return HttpResponse(body, status_code = 400)