--- a/feedback/views.py Tue Apr 13 15:15:13 2010 +0530
+++ b/feedback/views.py Tue Apr 13 16:29:58 2010 +0530
@@ -51,5 +51,16 @@
""" print a list of all the feedbacks collected.
"""
- feeds = Feedback.objects.all()
+ user = request.user
+
+ try:
+ event = Event.objects.get(key__iexact=event_key)
+ except Event.DoesNotExist:
+ raise Http404
+
+ if not user in event.organizers.all():
+ raise Http404
+
+ feeds = Feedback.objects.filter(event=event)
return render_to_response('list_feedbacks.html',{'feeds':feeds})
+