Skip to content

Commit

Permalink
SIO-1255 HTTP 500 handler doesn't work
Browse files Browse the repository at this point in the history
Change-Id: I6793a2328383c0ef28305540d286323530e31766
  • Loading branch information
Tom Macieszczak committed Oct 23, 2013
1 parent 8eaa4f7 commit 0b722b3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions oioioi/base/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.shortcuts import render_to_response, redirect
from django.shortcuts import render_to_response, redirect, render
from django.http import HttpResponse, HttpResponseForbidden
from django.template import TemplateDoesNotExist, RequestContext
from django.template.response import TemplateResponse
Expand Down Expand Up @@ -37,8 +37,7 @@ def handler500(request):
tb = ''
try:
tb = traceback.format_exc()
return render_to_response('500.html', status=500,
context_instance=RequestContext(request, {'traceback': tb}))
return render(request, '500.html', {'traceback': tb}, status=500)
except Exception:
message = '500 Internal Server Error'
if hasattr(request, 'user') and request.user.is_superuser:
Expand Down

0 comments on commit 0b722b3

Please sign in to comment.