# HG changeset patch # User nishanth # Date 1271339348 -19800 # Node ID d321a507fc268959431a1f38f288aab951cbac61 # Parent 3858a9d0f376ef101548d641102d0d91185e9d48 updated view_event page . diff -r 3858a9d0f376 -r d321a507fc26 reg/views.py --- a/reg/views.py Thu Apr 15 19:00:23 2010 +0530 +++ b/reg/views.py Thu Apr 15 19:19:08 2010 +0530 @@ -192,19 +192,17 @@ except Event.DoesNotExist: return redirect("/reg") - is_guest = False if user.is_authenticated() and user.is_active else True - is_attendee = True if user in event.attendees.all() else False + is_attendee = True if user.is_active and user in event.attendees.all() else False is_org = True if user in event.organizers.all() else False can_submit_feedback = False - if not event.feedback_status == "0": + if not event.feedback_status == "0" and user.is_authenticated(): try: FeedLog.objects.get(user=user,event=event,day=event.feedback_status) except FeedLog.DoesNotExist: can_submit_feedback = True context = {'user': user, - 'is_guest': is_guest, 'event': event, 'is_attendee': is_attendee, 'is_org': is_org, diff -r 3858a9d0f376 -r d321a507fc26 templates/feedback.html --- a/templates/feedback.html Thu Apr 15 19:00:23 2010 +0530 +++ b/templates/feedback.html Thu Apr 15 19:19:08 2010 +0530 @@ -1,8 +1,9 @@ {% extends "base.html" %} {% block content %} -Feedback on Day {{event.feedback_status}} of {{event.title}} at {{event.venue}} +Feedback on Day {{event.feedback_status}} of {{event.title}} at {{event.venue}}

{% if submitted %} - Your feedback has been successfully submitted. + Your feedback has been successfully submitted.
+ Return to the workshop page {% else %}
{{ form.as_p }} diff -r 3858a9d0f376 -r d321a507fc26 templates/view_event.html --- a/templates/view_event.html Thu Apr 15 19:00:23 2010 +0530 +++ b/templates/view_event.html Thu Apr 15 19:19:08 2010 +0530 @@ -5,19 +5,17 @@ {{event.description|linebreaksbr}}

Duration: {{event.start_date|date:"d M Y"}} to {{event.stop_date|date:"d M Y"}}
Venue: {{event.venue}}

- - {% if user.is_authenticated %} - {% if event.registration_is_open %} - {% if is_attendee %} - You have registered for this workshop.
- {% else %} + + {% if event.registration_is_open %} + {% if user.is_authenticated %} + {% if not is_attendee %} Register for this workshop.
{% endif %} {% else %} - Registration for this workshop is not open at this moment.
+ Register for this workshop.
{% endif %} {% else %} - Register for this workshop.
+ Registration for this workshop is not open at this moment.
{% endif %} {% if can_submit_feedback %}