# HG changeset patch # User nishanth # Date 1279712810 -19800 # Node ID 55f33856913308c5f1e240c70acea46e41d1c289 # Parent 86bfdb64edb567c6ab089fe253a0be6d112cfb5f updated the view for GET part and created corresponding template diff -r 86bfdb64edb5 -r 55f338569133 sdi/views.py --- a/sdi/views.py Wed Jul 21 16:57:17 2010 +0530 +++ b/sdi/views.py Wed Jul 21 17:16:50 2010 +0530 @@ -164,7 +164,30 @@ """ display list of confirmed participants who requested for accomodation and let the admin decide. """ - pass + + rejected_ppl = Registrant.objects.filter(registrantinfo__status_of_attending_sagedays ="3", + registrantinfo__status_of_accomodation="4") + selected_not_confirmed_ppl = Registrant.objects.filter(registrantinfo__status_of_attending_sagedays ="3", + registrantinfo__status_of_accomodation="2") + selected_confirmed_ppl = Registrant.objects.filter(registrantinfo__status_of_attending_sagedays ="3", + registrantinfo__status_of_accomodation="3") + not_selected_ppl = Registrant.objects.filter(registrantinfo__status_of_attending_sagedays ="3", + registrantinfo__status_of_accomodation="4") + + user_choices = list(rejected_ppl) + list(selected_not_confirmed_ppl) + list(not_selected_ppl) + form = UserSelectForm(user_choices, request.POST) + + if request.method == "POST" and form.is_valid(): + pass + else: + return render_to_response("send_acco_cnf.html", {"rejected": rejected_ppl, + "selected_not_confirmed":selected_not_confirmed_ppl, + "selected_confirmed":selected_confirmed_ppl, + "not_selected":not_confirmed_ppl, + }) + + + def confirm_wsp_participation(request, uid): """ match id versus email and take lappy details. diff -r 86bfdb64edb5 -r 55f338569133 templates/send_acco_cnf.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/send_acco_cnf.html Wed Jul 21 17:16:50 2010 +0530 @@ -0,0 +1,62 @@ +{% extends 'base.html' %} +{% block title %} +Send Accomodation Confirmation +{% endblock %} +{% block content %} +
+Not Selected ppl: {{not_selected.count}}
+ +{% for m in not_selected %} + + + + + + + +{% endfor %} +
{{m}} {{m.gender}} {{m.profession}} {{m.affiliated_to}}
+
+Selected but not Confirmed Ppl: {{selected_not_confirmed.count}}
+ +{% for m in selected_not_confirmed %} + + + + + + + +{% endfor %} +
{{m}} {{m.gender}} {{m.profession}} {{m.affiliated_to}}
+ +Rejected Ppl: {{rejected.count}}
+ +{% for m in rejected %} + + + + + + + +{% endfor %} +
{{m}} {{m.gender}} {{m.profession}} {{m.affiliated_to}}
+ + +
+

+Selected and confirmed Ppl: {{selected_confirmed.count}}
+ +{% for m in selected_confirmed %} + + + + + + +{% endfor %} +
{{m}} {{m.gender}} {{m.profession}} {{m.affiliated_to}}
+ +{% endblock %} +