--- a/sdi/events.py Mon Jul 26 19:33:38 2010 +0530
+++ b/sdi/events.py Mon Jul 26 20:09:10 2010 +0530
@@ -121,7 +121,7 @@
send_mail(subject, message, "sagedays@fossee.in", [user.email])
-def send_acco_confirm(user, message):
+def send_acco_confirm_mail(user_obj, message):
""" take the given message and add it to main message and send the mail.
"""
@@ -138,9 +138,9 @@
Sage Days India Team,
FOSSEE, IIT Bombay.
- """%(user.first_name.title(), user.last_name.title(),message)
+ """%(user_obj.first_name.title(), user_obj.last_name.title(),message)
- send_mail(subject, main_message, "sagedays@fossee.in", [user.email])
+ send_mail(subject, main_message, "sagedays@fossee.in", [user_obj.email])
def mail_invi(to_emails):
""" send the invitation email to given email addresses.
--- a/sdi/views.py Mon Jul 26 19:33:38 2010 +0530
+++ b/sdi/views.py Mon Jul 26 20:09:10 2010 +0530
@@ -7,7 +7,7 @@
from sage_days.sdi.models import Registrant, RegistrantInfo, ParticipantInfo
from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm, UserSelectForm, ParticipantInfoForm, SendAccoForm
-from sage_days.sdi.events import send_reg_complete_mail, mail_invi, send_sgd_ptc_confirm, send_cnf_email, send_wsp_ptc_confirm, send_acco_confirm
+from sage_days.sdi.events import send_reg_complete_mail, mail_invi, send_sgd_ptc_confirm, send_cnf_email, send_wsp_ptc_confirm, send_acco_confirm_mail
from sage_days.settings import APACHE_URL_PREFIX as aup
def register(request):
@@ -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(not_selected_ppl)
+ user_choices = list(selected_ppl) + list(not_selected_ppl)
form = SendAccoForm(user_choices, request.POST)
if request.method == "POST" and form.is_valid():
@@ -194,7 +194,7 @@
user_info.status_of_accomodation = "3"
user_info.save()
- send_acco_confirm(user, message)
+ send_acco_confirm_mail(user, message)
return render_to_response("sent_acco_confirm.html", {"selected_users":selected_users})
else: