# HG changeset patch # User nishanth # Date 1280147544 -19800 # Node ID f87248c912b47201196756a4210b6b1a534784d0 # Parent bbcf2a7d8b6ba4ff82b687b4b58e50e0d1747006 created view for sending acco_confirm diff -r bbcf2a7d8b6b -r f87248c912b4 sdi/events.py --- a/sdi/events.py Mon Jul 26 17:49:47 2010 +0530 +++ b/sdi/events.py Mon Jul 26 18:02:24 2010 +0530 @@ -121,7 +121,24 @@ send_mail(subject, message, "sagedays@fossee.in", [user.email]) +def send_acco_confirm(user, message): + """ take the given message and add it to main message and send the mail. + """ + subject = "Sage Days 25, India - Accomodation arranged" + + main_message=""" +Dear %s %s, + +Your request for accomodation during Sage Days 25, India has been accepted. + +%s + +Thanking you, + +Sage Days India Team, +FOSSEE, IIT Bombay. + """%(user.first_name.title(), user.last_name.title(),message) def mail_invi(to_emails): diff -r bbcf2a7d8b6b -r f87248c912b4 sdi/views.py --- a/sdi/views.py Mon Jul 26 17:49:47 2010 +0530 +++ b/sdi/views.py Mon Jul 26 18:02:24 2010 +0530 @@ -183,7 +183,7 @@ not_selected_ppl = Registrant.objects.filter(registrantinfo__status_of_attending_sagedays ="3", registrantinfo__status_of_accomodation="1") - user_choices = list(rejected_ppl) + list(selected_ppl) + list(not_selected_ppl) + user_choices = list(rejected_ppl) + list(not_selected_ppl) form = UserSelectForm(user_choices, request.POST) if request.method == "POST" and form.is_valid(): @@ -192,6 +192,8 @@ user_info = user.registrantinfo_set.all()[0] user_info.status_of_accomodation = "2" user_info.save() + + message = form.cleaned_data['message'] return render_to_response("sent_acco_confirm.html", {"selected_users":selected_users}) else: diff -r bbcf2a7d8b6b -r f87248c912b4 templates/send_acco_cnf.html --- a/templates/send_acco_cnf.html Mon Jul 26 17:49:47 2010 +0530 +++ b/templates/send_acco_cnf.html Mon Jul 26 18:02:24 2010 +0530 @@ -10,7 +10,7 @@ Your request for accomodation during Sage Days 25, India has been approved.
message:
- + Not Selected ppl: {{not_selected.count}}