Can any one point me to code where users can change their own passwords in Django?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How to change Django passwords
See the Changing passwords section
Navigation to your project where
manage.pyfile lies$ python manage.py shelltype below scripts :
from django.contrib.auth.models import User u = User.objects.get(username__exact='john') u.set_password('new password') u.save()You can also use the simple
manage.pycommand:manage.py changepassword *username*Just enter the new password twice.
from the Changing passwords section in the docs.
If you have the
django.contrib.adminin yourINSTALLED_APPS, you can visit:example.com/path-to-admin/password_change/which will have a form to confirm your old password and enter the new password twice.