feedback/views.py
changeset 38 b63b78017225
parent 36 cd0f61fa31f1
child 39 61d558a69b0d
equal deleted inserted replaced
37:981c3eb98e0e 38:b63b78017225
     2 
     2 
     3 from workshop.reg.models import Event
     3 from workshop.reg.models import Event
     4 
     4 
     5 from workshop.feedback.models import Feedback
     5 from workshop.feedback.models import Feedback
     6 from workshop.feedback.forms import FeedbackForm
     6 from workshop.feedback.forms import FeedbackForm
       
     7 from workshop.feedback.utils import compile_report
     7 
     8 
     8 from django.http import HttpResponse
     9 from django.http import HttpResponse
     9 
    10 
    10 def submit_feedback(request, event_key):
    11 def submit_feedback(request, event_key):
    11     """ see if the ip address has already submitted a feedback.
    12     """ see if the ip address has already submitted a feedback.
    59         raise Http404
    60         raise Http404
    60 
    61 
    61     if not user in event.organizers.all():
    62     if not user in event.organizers.all():
    62         raise Http404
    63         raise Http404
    63 
    64 
    64     feeds = Feedback.objects.filter(event=event)
    65     no_of_days = (event.stop_date - event.start_date).days
    65     return render_to_response('list_feedbacks.html',{'feeds':feeds})
    66     days = range(1,no_of_days+1)
    66 
    67 
       
    68 
       
    69     return render_to_response('list_feedbacks.html',{'user':user, 'event':event})
       
    70