# HG changeset patch
# User nishanth
# Date 1271315181 -19800
# Node ID 61d558a69b0d091a90c378895774d55610d2f2f0
# Parent b63b780172252a21ffbeeab5a39627834d90e5a8
implemented listing of feedbacks.
diff -r b63b78017225 -r 61d558a69b0d feedback/views.py
--- a/feedback/views.py Thu Apr 15 11:57:42 2010 +0530
+++ b/feedback/views.py Thu Apr 15 12:36:21 2010 +0530
@@ -63,8 +63,17 @@
raise Http404
no_of_days = (event.stop_date - event.start_date).days
- days = range(1,no_of_days+1)
-
+ days = range(1,no_of_days+2)
- return render_to_response('list_feedbacks.html',{'user':user, 'event':event})
+ feeds_list = []
+ for day in days:
+ day_feeds = Feedback.objects.filter(event=event,day=day)
+ if day_feeds.count():
+ day_list = []
+ for feed in day_feeds:
+ day_list.append(" ".join((feed.topics, feed.depth, feed.methodology, feed.pace,
+ feed.applicability, feed.problems, feed.exercises, feed.comments)))
+ feeds_list.append(["Day %s"%day, day_list])
+ return render_to_response('list_feedbacks.html',{'user':user, 'event':event, 'feeds_list':feeds_list})
+
diff -r b63b78017225 -r 61d558a69b0d templates/list_feedbacks.html
--- a/templates/list_feedbacks.html Thu Apr 15 11:57:42 2010 +0530
+++ b/templates/list_feedbacks.html Thu Apr 15 12:36:21 2010 +0530
@@ -1,8 +1,8 @@
{% extends "base.html" %}
{% block content %}
-Report of the workshop {{event.title}}
-conducted at {{event.venue}} from {{event.start_date|date:"d M Y"}} to
-{{event.stop_date|date:"d M Y"}}
+List of feedbacks submitted for the workshop {{event.title}}
-{{workshop_report|unordered_list}}
+{% for day_list in feeds_list %}
+ {{day_list|unordered_list}}
+{% endfor %}
{% endblock %}