diff options
author | hardythe1 | 2014-04-11 14:17:40 +0530 |
---|---|---|
committer | hardythe1 | 2014-04-11 14:17:40 +0530 |
commit | d3b51b8b41478e42c441403d6a72a3e32be19e1e (patch) | |
tree | a08a78be347bdedbea3f6a395db5b9a2559871bb /tbc | |
parent | a197bca0283bbe41c03ab52ace4f464ee49157a0 (diff) | |
download | Python-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-x | tbc/views.py | 15 |
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 |