--- a/sdi/site/urls.py Fri Jul 16 10:45:01 2010 +0530
+++ b/sdi/site/urls.py Fri Jul 16 18:50:52 2010 +0530
@@ -12,5 +12,6 @@
(r'^logout/$', admin_logout),
(r'^send_wsp_cnf/$', send_workshop_confirm),
(r'^cnf_wsp_ptc/(\w+)/$', confirm_wsp_participation),
+ (r'^send_sgd_cnf/$', send_sagedays_confirm),
)
--- 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.
"""
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/send_sgd_cnf.html Fri Jul 16 18:50:52 2010 +0530
@@ -0,0 +1,49 @@
+{% extends 'base.html' %}
+{% block title %}
+Send Event Participation Confirmation
+{% endblock %}
+{% block content %}
+<form action="" method=post>
+Not Selected ppl: <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 />
+Not Confirmed Ppl: <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 />
+</form>
+
+Attending Ppl: <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>
+</tr>
+{% endfor %}
+</table>
+
+{% endblock %}
+