feedback/views.py
changeset 96 e51b94b6b5a4
parent 94 5de0009c0d71
child 97 87d522d28a28
equal deleted inserted replaced
95:f5ae0bcb044e 96:e51b94b6b5a4
   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 = Feedback.objects.filter(event=event,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 = "Comments: <br /><ol>"
   110             day_comments = []
   111             for feed in day_feeds:
   111             for feed in day_feeds:
   112                 if feed.comments:
   112                 if feed.comments:
   113                     day_comments += "<li>%s</li>"%feed.comments
   113                     day_comments.append(feed.comments)
   114             day_comments += "</ol>"
   114                     day_report.extend(["Comments:",day_comments])
   115             day_report.append(day_comments)
       
   116             workshop_report.extend( [ "Day %s"%day_num, day_report] )
   115             workshop_report.extend( [ "Day %s"%day_num, day_report] )
   117 
   116 
   118     return render_to_response("show_report.html", {"user":user, "event":event, "workshop_report":workshop_report})
   117     return render_to_response("show_report.html", {"user":user, "event":event, "workshop_report":workshop_report})