sdi/views.py
branchanoop
changeset 108 9363e5121f9b
parent 107 9fd140628988
child 110 01b5184402c8
--- a/sdi/views.py	Fri Jul 16 10:45:01 2010 +0530
+++ b/sdi/views.py	Fri Jul 16 18:50:52 2010 +0530
@@ -125,6 +125,27 @@
     else:
         return render_to_response("send_workshop_confirm.html", {"matches":matches}) 
 
+@login_required
+def send_sagedays_confirm(request):
+    """ 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")
+
+    user_choices = list(attending_ppl) + list(not_confirmed_ppl)
+    form = UserSelectForm(user_choices, request.POST)
+
+    if request.method == "POST" and form.is_valid():
+        pass
+    else:
+        render_to_response("send_sgd_cnf.html", {"attending":attending_ppl, 
+                                                "not_confirmed":not_confirmed_ppl,
+                                                "not_selected":not_selected_ppl,
+                                               }
+
+
 def confirm_wsp_participation(request, uid):
     """ match id versus email and take lappy details.
     """