now opening feedback code is a lil better .
--- a/reg/views.py Tue Apr 13 14:59:34 2010 +0530
+++ b/reg/views.py Tue Apr 13 15:01:05 2010 +0530
@@ -271,17 +271,15 @@
try:
event = Event.objects.get(key__iexact=event_key)
except Event.DoesNotExist:
- return redirect("/reg")
+ raise Http404
- is_org = True if user in event.organizers.all() and user.is_staff else False
-
- if is_org:
+ if user in event.organizers.all() and user.is_staff:
day = event.feedback_status
event.feedback_status = '0'
event.save()
return render_to_response('close_feedback.html', {'user':user, 'event': event, 'day':day})
else:
- return redirect('/reg')
+ raise Http404
def open_registration(request, event_key):
""" simply check for is_org and then set the registration_is_open flag.