feedback/views.py
changeset 35 79dc44b6edd4
parent 11 334550460bd7
child 36 cd0f61fa31f1
--- a/feedback/views.py	Tue Apr 13 15:09:41 2010 +0530
+++ b/feedback/views.py	Tue Apr 13 15:15:13 2010 +0530
@@ -15,16 +15,16 @@
     try:
         event = Event.objects.get(key=event_key)
     except Event.DoesNotExist:
-        return redirect('/reg')
+        raise Http404
 
     if event.feedback_status == "0":
-        return redirect('/reg')
+        raise Http404
 
     user_ip = request.META["REMOTE_ADDR"]
     try:
         old_feedback = Feedback.objects.get(day=event.feedback_status, user_ip=user_ip)
         return render_to_response('feedback.html', {'submitted':True})
-    except:
+    except Feedback.DoesNotExist:
         new_feedback = Feedback(event=event, user_ip=user_ip, day=event.feedback_status)
     
     if request.method == "POST":