# HG changeset patch # User nishanhth # Date 1279818463 -19800 # Node ID 27dd4494e7b4e4e7e327d59821a5a0fb82eeca11 # Parent c7c5c727a483c6a638b0e0c9ce92e079d0a4923e created the mail event and added it in view for send_wsp_ptc diff -r c7c5c727a483 -r 27dd4494e7b4 sdi/events.py --- a/sdi/events.py Thu Jul 22 19:50:36 2010 +0530 +++ b/sdi/events.py Thu Jul 22 22:37:43 2010 +0530 @@ -31,6 +31,31 @@ send_mail(subject, message, "sagedays@fossee.in", [email]) +def send_wsp_ptc_confirm(user) + """ send a mail telling a worksho has been scheduled. + """ + + subject = "Sage Days 25, India - Python Workshop" + + message = """ +Dear %s %s, + +We are conducting a one day workshop on Python on Jul 31st for people who requested a workshop before Sage Days 25. + +Please click the link below or paste it in a browser to confirm your participation. +http://fossee.in/sage_days/registration/cnf_wsp_ptc/%s?email=%s + +Please ignore this mail if you are not likely to attend the workshop. + +Thanking you, + +Sage Days India Team, +FOSSEE, IIT Bombay. + """%(user.first_name.title(), user.last_name.title(), user.id, user.email) + + send_mail(subject, message, "sagedays@fossee.in", [user.email]) + + def send_sgd_ptc_confirm(user): """ send a mail telling that you have been selected to attend sage days. """ diff -r c7c5c727a483 -r 27dd4494e7b4 sdi/views.py --- a/sdi/views.py Thu Jul 22 19:50:36 2010 +0530 +++ b/sdi/views.py Thu Jul 22 22:37:43 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 -from sage_days.sdi.events import send_reg_complete_mail, mail_invi, send_sgd_ptc_confirm, send_cnf_email +from sage_days.sdi.events import send_reg_complete_mail, mail_invi, send_sgd_ptc_confirm, send_cnf_email, send_wsp_ptc_confirm from sage_days.settings import APACHE_URL_PREFIX as aup def register(request): @@ -134,6 +134,8 @@ user_info.status_of_attending_workshop = "2" user_info.save() + send_wsp_ptc_confirm(user) + return render_to_response("sent_wsp_confirm.html", {"selected_users":selected_users}) else: return render_to_response("send_wsp_cnf.html", {"attending": attending_ppl,