reg/views.py
changeset 33 6a68ef9597f9
parent 32 00a016cf226e
child 37 981c3eb98e0e
equal deleted inserted replaced
32:00a016cf226e 33:6a68ef9597f9
   243 
   243 
   244     user = request.user
   244     user = request.user
   245     try:
   245     try:
   246         event = Event.objects.get(key__iexact=event_key)
   246         event = Event.objects.get(key__iexact=event_key)
   247     except Event.DoesNotExist:
   247     except Event.DoesNotExist:
   248         return redirect("/reg")
   248         raise Http404
   249 
   249 
   250     can_do_this = True if user in event.organizers.all() and user.is_staff else False
   250     if user in event.organizers.all() and user.is_staff and event.feedback_status == '0':
   251 
       
   252     if can_do_this and event.feedback_status == '0':
       
   253         #days = event.stop_date.day() - event.start_date.day() + 1
   251         #days = event.stop_date.day() - event.start_date.day() + 1
   254         days = 2
   252         days = 2
   255         if request.method == "POST":
   253         if request.method == "POST":
   256             day = request.POST['day']
   254             day = request.POST['day']
   257             event.feedback_status = day
   255             event.feedback_status = day