# HG changeset patch # User nishanth # Date 1271156398 -19800 # Node ID cd0f61fa31f17cfdf0ed8314f0de214214ab2d62 # Parent 79dc44b6edd428c3c2cc3cfc98a933cad02ad920 removed quiz links from view event template . diff -r 79dc44b6edd4 -r cd0f61fa31f1 feedback/views.py --- 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}) + diff -r 79dc44b6edd4 -r cd0f61fa31f1 templates/view_event.html --- a/templates/view_event.html Tue Apr 13 15:15:13 2010 +0530 +++ b/templates/view_event.html Tue Apr 13 16:29:58 2010 +0530 @@ -24,25 +24,25 @@ {% endif %} {% if is_org %} - Click here to view list of people registered for the workshop.
- Click here to see the feedbacks that we submitted.

+ View list of people registered for the workshop
+ View submitted feedbacks

{% if user.is_staff %} {% if event.registration_is_open %} - Click here to close the registration.
+ Close the registration
{% else %} - Click here to open the registration.
+ Open the registration
{% endif %} - + {% ifequal event.feedback_status "0" %} - Click here to open the feedback.
+ Open feedback
{% else %} - Click here to close the feedback for day {{event.feedback_status}}.
+ Close the feedback for day {{event.feedback_status}}
{% endifequal %} {% endif %} {% endif %}