now closing registration code is a lil better .
--- a/reg/views.py Tue Apr 13 14:55:21 2010 +0530
+++ b/reg/views.py Tue Apr 13 14:58:10 2010 +0530
@@ -312,14 +312,12 @@
except Event.DoesNotExist:
return redirect("/reg")
- 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:
event.registration_is_open = False
event.save()
return render_to_response('reg_close.html', {'user':user, 'event': event})
else:
- return redirect('/reg')
+ raise Http404
def register_for_event(request, event_key):
""" check if the user is logged in.