From: Aleksander Ɓukasz Date: Fri, 8 Nov 2013 13:38:50 +0000 (+0100) Subject: Changing response type for easier debugging X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/112502b03c5ebee5bee7f59c2a7d57c5050dbb07 Changing response type for easier debugging --- diff --git a/wtem/views.py b/wtem/views.py index 896746a..c49298d 100644 --- a/wtem/views.py +++ b/wtem/views.py @@ -3,7 +3,7 @@ import os from django.shortcuts import render from django.utils import simplejson from django.conf import settings -from django.http import Http404 +from django.http import Http404, HttpResponseForbidden from .models import Submission, DEBUG_KEY from .forms import WTEMForm @@ -24,7 +24,7 @@ def form_during(request, key): if WTEM_CONTEST_STAGE != 'during': if request.META['REMOTE_ADDR'] != getattr(settings, 'WTEM_CONTEST_IP_ALLOW', 'xxx'): - raise Http404 + return HttpResponseForbidden('Not allowed') try: submission = Submission.objects.get(key = key)