Django 1.5: Cannot login on password change

134 Views Asked by At

I was trying to change a user's password in my django app using the following lines of code:

from django.contrib.auth.models import User
u = User.objects.get(email__exact='[email protected]')
u.set_password('mynewpassword')
u.save()

(This user already exists in the User database)

There was no error or anything. But now I cannot login using the new password OR the old password !!

What happened ??

( This happens with all the users created. Unable to login to admin either ( even with changing using manage.py changepassword )

0

There are 0 best solutions below