# HG changeset patch # User nishanth # Date 1279286452 -19800 # Node ID 9363e5121f9bd6c607510755018cc4905e91705f # Parent 9fd1406289885cbc7050bf63f6a4fb080321db7c added the GET part of view for sending event confirmation emails diff -r 9fd140628988 -r 9363e5121f9b sdi/site/urls.py --- 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), ) diff -r 9fd140628988 -r 9363e5121f9b sdi/views.py --- 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. """ diff -r 9fd140628988 -r 9363e5121f9b templates/send_sgd_cnf.html --- /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 %} +
+Not Selected ppl:
+ +{% for m in not_selected %} + + + + + + + +{% endfor %} +
{{m}} {{m.gender}} {{m.profession}} {{m.affiliated_to}}
+
+Not Confirmed Ppl:
+ +{% for m in not_confirmed %} + + + + + + + +{% endfor %} +
{{m}} {{m.gender}} {{m.profession}} {{m.affiliated_to}}
+ + +
+ +Attending Ppl:
+ +{% for m in attending %} + + + + + + +{% endfor %} +
{{m}} {{m.gender}} {{m.profession}} {{m.affiliated_to}}
+ +{% endblock %} +