samedi 9 août 2014

python - Django 1.5 : impossible de connecter sur le changement de mot de passe - Stack Overflow


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='someemail@someting.com')
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 )



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='someemail@someting.com')
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 commentaires:

Enregistrer un commentaire