# HG changeset patch # User nishanth # Date 1279306576 -19800 # Node ID 6c3602582f9f97b89211358847dec78bf66d6d79 # Parent af9472ab8f3ed5ab2cf49defdc23ca443d88c657 included the send_mail and created the corresponding event in events diff -r af9472ab8f3e -r 6c3602582f9f sdi/events.py --- a/sdi/events.py Sat Jul 17 00:08:33 2010 +0530 +++ b/sdi/events.py Sat Jul 17 00:26:16 2010 +0530 @@ -4,7 +4,7 @@ """ send registration complete email to the registered user. """ - subject = "Sage Days India 25 - Registration" + subject = "Sage Days 25, India - Registration" message = """ Dear %s %s, @@ -31,6 +31,34 @@ send_mail(subject, message, "sagedays@fossee.in", [email]) +def send_wsp_ptc_confirm(user): + """ send a mail telling that you have been selected to attend sage days. + """ + + subject = "Sage Days 25, India - Selected for participation" + + message = """ +Dear %s %s, + +You have been selected to attend Sage Days 25, India. + +Please click the link below or paste it in a browser to confirm your participation. +http://fossee.in/sage_days/registration/cnf_sgd_ptc/%s?email=%s + +Please ignore this mail if you are not likely to attend Sage Days 25, India. + +PS: +Your participation will be confirmed only if you visit the link above at the latest by 26 July, 2010. +If you by any chance have not confirmed your participation by 26 July, 2010 and still want to participate, write a mail to sagedays@fossee.in + +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", [email]) + def mail_invi(to_emails): """ send the invitation email to given email addresses. """ diff -r af9472ab8f3e -r 6c3602582f9f sdi/views.py --- a/sdi/views.py Sat Jul 17 00:08:33 2010 +0530 +++ b/sdi/views.py Sat Jul 17 00:26:16 2010 +0530 @@ -7,7 +7,7 @@ from sage_days.sdi.models import Registrant from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm, UserSelectForm -from sage_days.sdi.events import send_reg_complete_mail, mail_invi +from sage_days.sdi.events import send_reg_complete_mail, mail_invi, send_wsp_ptc_confirm from sage_days.settings import APACHE_URL_PREFIX as aup def register(request): @@ -143,6 +143,8 @@ user_info = user.registrantinfo_set.all()[0] user_info.status_of_attending_sagedays = "2" user_info.save() + + send_wsp_ptc_confirm(user) return render_to_response("sent_sgd_confirm.html", {"selected_users":selected_users}) else: diff -r af9472ab8f3e -r 6c3602582f9f templates/send_sgd_cnf.html --- a/templates/send_sgd_cnf.html Sat Jul 17 00:08:33 2010 +0530 +++ b/templates/send_sgd_cnf.html Sat Jul 17 00:26:16 2010 +0530 @@ -30,7 +30,7 @@ {% endfor %} - + Attending Ppl: