# HG changeset patch
# User nishanth
# Date 1271136029 -19800
# Node ID 115860e872381e61c4eeb253ffd40fff8f2c5afc
# Parent 7dae32a2439b8a4f3e16067732d6831e4e4ea5b0
implemented list people functionality .
diff -r 7dae32a2439b -r 115860e87238 reg/site/urls.py
--- a/reg/site/urls.py Mon Apr 12 18:15:21 2010 +0530
+++ b/reg/site/urls.py Tue Apr 13 10:50:29 2010 +0530
@@ -15,6 +15,7 @@
(r'^event/list/$', reg_views.list_events),
(r'^event/view/(\w+)/$', reg_views.view_event),
(r'^event/register/(\w+)/$', reg_views.register_for_event),
+ (r'^event/attendees/(\w+)/$', reg_views.list_attendees),
(r'^event/feedback/open/(\w+)/$', reg_views.open_feedback),
(r'^event/feedback/close/(\w+)/$', reg_views.close_feedback),
(r'^event/registration/open/(\w+)/$', reg_views.open_registration),
diff -r 7dae32a2439b -r 115860e87238 reg/views.py
--- a/reg/views.py Mon Apr 12 18:15:21 2010 +0530
+++ b/reg/views.py Tue Apr 13 10:50:29 2010 +0530
@@ -340,3 +340,19 @@
return render_to_response('list_events.html', context)
+def list_attendees(request, event_key):
+ """ see if the request user is org.
+ Else redirect him to homepage.
+ """
+
+ user = request.user
+ try:
+ event = Event.objects.get(key__iexact=event_key)
+ except Event.DoesNotExist:
+ return redirect('/reg')
+
+ if not user in event.organizers.all():
+ return redirect('/reg')
+
+ profile = user.get_profile()
+ return render_to_response('list_attendees.html', {'user':user, 'event':event, 'attendees':event.attendees.all()})
diff -r 7dae32a2439b -r 115860e87238 templates/account_created.html
--- a/templates/account_created.html Mon Apr 12 18:15:21 2010 +0530
+++ b/templates/account_created.html Tue Apr 13 10:50:29 2010 +0530
@@ -1,5 +1,7 @@
{% extends "base.html" %}
{% block content %}
The account has been created.
+Click here to activate your account.
+This link will be sent to your email.
click here to go to login page.
{% endblock %}
diff -r 7dae32a2439b -r 115860e87238 templates/index.html
--- a/templates/index.html Mon Apr 12 18:15:21 2010 +0530
+++ b/templates/index.html Tue Apr 13 10:50:29 2010 +0530
@@ -3,5 +3,6 @@
{% if user.is_staff %}
Create an event
{% endif %}
+ List of Workshops
{% endblock %}
diff -r 7dae32a2439b -r 115860e87238 templates/list_attendees.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/list_attendees.html Tue Apr 13 10:50:29 2010 +0530
@@ -0,0 +1,30 @@
+{% extends "base.html" %}
+{% block content %}
+ List of people registered for "{{event.title}}"
+
+
+ Name |
+ Gender |
+ Profession |
+ College/Company |
+ Interests |
+
+ {% for a_user in attendees %}
+
+ {{a_user.get_full_name}} |
+ {{a_user.get_profile.gender}} |
+ {% ifequal a_user.get_profile.profession "S" %}
+ Student
+ {% else %}
+ {% ifequal a_user.get_profile.profession "F" %}
+ Faculty
+ {% else %}
+ Professional
+ {% endifequal %}
+ {% endifequal %}
+ |
+ {{a_user.get_profile.interests}} |
+
+ {% endfor %}
+
+{% endblock %}
diff -r 7dae32a2439b -r 115860e87238 templates/list_events.html
--- a/templates/list_events.html Mon Apr 12 18:15:21 2010 +0530
+++ b/templates/list_events.html Tue Apr 13 10:50:29 2010 +0530
@@ -5,7 +5,7 @@
{% for event in ongoing_events %}
- {{event.title}} |
+ {{event.title}} |
{{event.start_date|date:"d M Y"}} - {{event.stop_date|date:"d M Y"}} |
{% endfor %}
@@ -17,7 +17,7 @@
{% for event in upcoming_events %}
- {{event.title}} |
+ {{event.title}} |
{{event.start_date|date:"d M Y"}} - {{event.stop_date|date:"d M Y"}} |
{% endfor %}
@@ -31,7 +31,7 @@
{% for event in previous_events %}
- {{event.title}} |
+ {{event.title}} |
{{event.start_date|date:"d M Y"}} - {{event.stop_date|date:"d M Y"}} |
{% endfor %}
diff -r 7dae32a2439b -r 115860e87238 templates/password_reset.html
--- a/templates/password_reset.html Mon Apr 12 18:15:21 2010 +0530
+++ b/templates/password_reset.html Tue Apr 13 10:50:29 2010 +0530
@@ -1,7 +1,8 @@
{% extends "base.html" %}
{% block content %}
{% if new_password %}
- Your password has been reset to {{ new_password }}. Click here to return to home page.
+ Your password is "{{ new_password }}". This will be sent to your email id when app is on FOSSEE.
+ Click here to return to home page.
{% else %}