feedback/views.py
changeset 97 87d522d28a28
parent 96 e51b94b6b5a4
equal deleted inserted replaced
96:e51b94b6b5a4 97:87d522d28a28
   102 
   102 
   103     workshop_report = []
   103     workshop_report = []
   104 
   104 
   105     for day in days:
   105     for day in days:
   106         day_num = str(day)
   106         day_num = str(day)
   107         day_feeds = Feedback.objects.filter(event=event,day=day_num)
   107         day_feeds = event.feedback.filter(day=day_num)
   108         day_report = make_day_report(day_feeds) 
   108         day_report = make_day_report(day_feeds) 
   109         if day_report:
   109         if day_report:
   110             day_comments = []
   110             day_comments = [ feed.comments for feed in day_feeds if feed.comments ]
   111             for feed in day_feeds:
   111             day_report.extend(["General comments:",day_comments])
   112                 if feed.comments:
       
   113                     day_comments.append(feed.comments)
       
   114                     day_report.extend(["Comments:",day_comments])
       
   115             workshop_report.extend( [ "Day %s"%day_num, day_report] )
   112             workshop_report.extend( [ "Day %s"%day_num, day_report] )
   116 
   113 
   117     return render_to_response("show_report.html", {"user":user, "event":event, "workshop_report":workshop_report})
   114     return render_to_response("show_report.html", {"user":user, "event":event, "workshop_report":workshop_report})