summaryrefslogtreecommitdiff
path: root/tbc
diff options
context:
space:
mode:
authorhardythe12014-04-11 14:17:40 +0530
committerhardythe12014-04-11 14:17:40 +0530
commitd3b51b8b41478e42c441403d6a72a3e32be19e1e (patch)
treea08a78be347bdedbea3f6a395db5b9a2559871bb /tbc
parenta197bca0283bbe41c03ab52ace4f464ee49157a0 (diff)
downloadPython-TBC-Interface-d3b51b8b41478e42c441403d6a72a3e32be19e1e.tar.gz
Python-TBC-Interface-d3b51b8b41478e42c441403d6a72a3e32be19e1e.tar.bz2
Python-TBC-Interface-d3b51b8b41478e42c441403d6a72a3e32be19e1e.zip
editing the message to the user
Diffstat (limited to 'tbc')
-rwxr-xr-xtbc/views.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/tbc/views.py b/tbc/views.py
index ec9715b..12be768 100755
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -202,16 +202,17 @@ def ForgotPassword(request):
if email in user_emails:
user = User.objects.get(email=email)
password = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(8))
- print password
user.set_password(password)
user.save()
subject = "PythonTBC: Password Reset"
- message = "Dear "+user.first_name+",\n"+"We have reset the password\
- for you. Your credentials are:\n"+"Username: "+user.username+"\n\
- Password: "+password+"\n\nYou can use this password to login. We \
- recommend that you update your password through the link given \
- below, once you have logged in successfully.\
- Link: http://tbc-python.fossee.in/update-password.\n\nThank You !"
+ message = "Dear "+user.first_name+",\n"+
+ "Your password for PythonTBC interface has been reset."+
+ "Your credentials are:\n"+
+ "Username: "+user.username+
+ "\nPassword: "+password+
+ "\n\nKindly login with the given password and update your password through the below given link."+
+ "\nLink: http://tbc-python.fossee.in/update-password."+
+ "\n\nThank You !"
email_send(email, subject, message)
form = UserLoginForm()
context['form'] = form