diff options
author | parth | 2012-04-02 12:17:34 +0530 |
---|---|---|
committer | parth | 2012-04-02 12:17:34 +0530 |
commit | 906a72b182668f93145ebc8155069b90b4d1d457 (patch) | |
tree | b83df677d7be199cdc35d9325927584e4779d224 | |
parent | a41d7c069f31bd6c349d630734939c2a89c8c645 (diff) | |
download | aloha-906a72b182668f93145ebc8155069b90b4d1d457.tar.gz aloha-906a72b182668f93145ebc8155069b90b4d1d457.tar.bz2 aloha-906a72b182668f93145ebc8155069b90b4d1d457.zip |
changed the email code
-rw-r--r-- | aloha/allotter/views.py | 16 |
1 files 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) |