From 112502b03c5ebee5bee7f59c2a7d57c5050dbb07 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Fri, 8 Nov 2013 14:38:50 +0100 Subject: [PATCH] Changing response type for easier debugging --- wtem/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.20.1