From 906a72b182668f93145ebc8155069b90b4d1d457 Mon Sep 17 00:00:00 2001 From: parth Date: Mon, 2 Apr 2012 12:17:34 +0530 Subject: changed the email code --- aloha/allotter/views.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/aloha/allotter/views.py b/aloha/allotter/views.py index 02d080c..f8565e1 100644 --- a/aloha/allotter/views.py +++ b/aloha/allotter/views.py @@ -194,11 +194,19 @@ def complete_allotment(request, reg_no): if options_chosen: counter = 1 for option in options_chosen: - content = "Preference Number: %s, Option Code: %s, Option Name: %s, Location: %s \n" %(counter, option.opt_code, option.opt_name, option.opt_location) + content += "Preference Number: %s, Option Code: %s, Option Name: %s, Location: %s \n" %(counter, option.opt_code, option.opt_name, option.opt_location) + counter += 1 - content += "Please do not delete this email and keep it for reference purposes. \n Regards, \n JAM Office, IIT Bombay" - #send_mail(subject, content, from_email, [sec_email]) - #mail_admins(subject, content) + content += "\n \n \nPlease do not delete this email and keep it for reference purposes. \n \n \n \n Regards, \n JAM Office, IIT Bombay" + admin_content = content + admin_content +="\n\n\n#%s:" % (reg_no) + counter = 1 + for option in options_chosen: + content += "%s,%s:" %(counter, option.opt_code) + counter += 1 + admin_content +="#" + send_mail(subject, content, from_email, [sec_email]) + mail_admins(subject, admin_content) return render(request, 'allotter/complete.html', context) -- cgit