fixed a bug in views anoop
authornishanth
Tue, 20 Jul 2010 13:18:40 +0530
branchanoop
changeset 146 a18ba6b30c43
parent 145 dec4a9b61534
child 147 76935f280a4d
fixed a bug in views
sdi/views.py
templates/send_sgd_cnf.html
--- a/sdi/views.py	Tue Jul 20 13:10:05 2010 +0530
+++ b/sdi/views.py	Tue Jul 20 13:18:40 2010 +0530
@@ -137,9 +137,9 @@
     """ filter out ppl depending on their status and display accordingly.
     """
 
-    attending_ppl = Registrant.objects.filter(need_for_python_workshop=True, registrantinfo__status_of_attending_sagedays ="3")
-    not_confirmed_ppl = Registrant.objects.filter(need_for_python_workshop=True, registrantinfo__status_of_attending_sagedays ="2")
-    not_selected_ppl = Registrant.objects.filter(need_for_python_workshop=True, registrantinfo__status_of_attending_sagedays ="1")
+    attending_ppl = Registrant.objects.filter(registrantinfo__status_of_attending_sagedays ="3")
+    not_confirmed_ppl = Registrant.objects.filter(registrantinfo__status_of_attending_sagedays ="2")
+    not_selected_ppl = Registrant.objects.filter(registrantinfo__status_of_attending_sagedays ="1")
 
     user_choices = list(not_selected_ppl) + list(not_confirmed_ppl)
     form = UserSelectForm(user_choices, request.POST)
--- a/templates/send_sgd_cnf.html	Tue Jul 20 13:10:05 2010 +0530
+++ b/templates/send_sgd_cnf.html	Tue Jul 20 13:18:40 2010 +0530
@@ -4,7 +4,7 @@
 {% endblock %}
 {% block content %}
 <form action="" method=post>
-Not Selected ppl: <br >
+Not Selected ppl: {{not_selected.count}}<br >
 <table cellspacing=2 cellpadding=2>
 {% for m in not_selected %}
 <tr>
@@ -17,7 +17,7 @@
 {% endfor %}
 </table>
 <br />
-Selected but not Confirmed Ppl: <br />
+Selected but not Confirmed Ppl: {{not_confirmed.count}}<br />
 <table cellspacing=2 cellpadding=2>
 {% for m in not_confirmed %}
 <tr>
@@ -32,8 +32,8 @@
 
 <input type=submit value="Send confirmation email"  />
 </form>
-
-Attending Ppl: <br />
+<br /><br />
+Attending Ppl: {{attending.count}}<br />
 <table cellspacing=2 cellpadding=2>
 {% for m in attending %}
 <tr>