removed old template and copied send_sgd_cnf as send_wsp_cnf since both are same and fixed a bug in view anoop
authornishanth
Thu, 22 Jul 2010 19:50:36 +0530
branchanoop
changeset 161 c7c5c727a483
parent 160 2f01af211af9
child 162 27dd4494e7b4
removed old template and copied send_sgd_cnf as send_wsp_cnf since both are same and fixed a bug in view
sdi/views.py
templates/send_workshop_confirm.html
templates/send_wsp_cnf.html
--- a/sdi/views.py	Thu Jul 22 19:34:24 2010 +0530
+++ b/sdi/views.py	Thu Jul 22 19:50:36 2010 +0530
@@ -129,7 +129,7 @@
     form = UserSelectForm(choices, request.POST)
     if request.method == "POST" and form.is_valid():
         selected_users = form.cleaned_data['selected_users']
-        for u in selected_users:
+        for user in selected_users:
             user_info = user.registrantinfo_set.all()[0]
             user_info.status_of_attending_workshop = "2"
             user_info.save()
--- a/templates/send_workshop_confirm.html	Thu Jul 22 19:34:24 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-{% extends 'base.html' %}
-{% block title %}
-Workshop Confirmaton Mail
-{% endblock %}
-{% block content %}
-<form action="" method=post>
-<table cellspacing=2 cellpadding=2>
-{% for m in matches %}
-<tr>
-<td> <input type="checkbox" name="selected_users" value="{{m.id}}" id="id_selected_users_0" /> </td>
-<td> {{m}} </td>
-<td> {{m.gender}} </td>
-<td> {{m.profession}}</td>
-<td> {{m.affiliated_to}} </td>
-</tr>
-{% endfor %}
-</table>
-<input type=submit value=send />
-</form>
-{% endblock %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/send_wsp_cnf.html	Thu Jul 22 19:50:36 2010 +0530
@@ -0,0 +1,56 @@
+{% extends 'base.html' %}
+{% block title %}
+Send Workshop Participation Confirmation
+{% endblock %}
+{% block content %}
+<form action="" method=post>
+Not Selected ppl: {{not_selected.count}}<br >
+<table cellspacing=2 cellpadding=2>
+{% for m in not_selected %}
+<tr>
+<td> <input type="checkbox" name="selected_users" value="{{m.id}}" id="id_selected_users_0" /> </td>
+<td> {{m}} </td>
+<td> {{m.gender}} </td>
+<td> {{m.profession}}</td>
+<td> {{m.affiliated_to}} </td>
+</tr>
+{% endfor %}
+</table>
+<br />
+Selected but not Confirmed Ppl: {{not_confirmed.count}}<br />
+<table cellspacing=2 cellpadding=2>
+{% for m in not_confirmed %}
+<tr>
+<td> <input type="checkbox" name="selected_users" value="{{m.id}}" id="id_selected_users_0" /> </td>
+<td> {{m}} </td>
+<td> {{m.gender}} </td>
+<td> {{m.profession}}</td>
+<td> {{m.affiliated_to}} </td>
+</tr>
+{% endfor %}
+</table>
+
+<input type=submit value="Send confirmation email"  />
+</form>
+<br /><br />
+Attending Ppl: {{attending.count}}<br />
+<table cellspacing=2 cellpadding=2>
+{% for m in attending %}
+<tr>
+<td> {{m}} </td>
+<td> {{m.gender}} </td>
+<td> {{m.profession}}</td>
+<td> {{m.affiliated_to}} </td>
+<td>
+{% if m.registrantinfo_set.all.0.has_laptop_for_workshop %}
+True
+{% else %}
+False
+{% endif %}
+</td>
+</tr>
+{% endfor %}
+</table>
+
+{% endblock %}
+