implemented listing of feedbacks.
--- 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})
+
--- 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 <a href="/reg/event/view/{{event.key}}">{{event.title}}</a>
-conducted at {{event.venue}} from {{event.start_date|date:"d M Y"}} to
-{{event.stop_date|date:"d M Y"}}<br />
+List of feedbacks submitted for the workshop <a href="/reg/event/view/{{event.key}}">{{event.title}}</a>
<br />
-{{workshop_report|unordered_list}}
+{% for day_list in feeds_list %}
+ {{day_list|unordered_list}}
+{% endfor %}
{% endblock %}