Django Reset Admin User's Password

Change a user's password from the command line, use the changepassword command. It will prompt you to change the password for the specified user.

./ changepassword admin changepassword admin

You can also change a password programmatically:

from django.contrib.auth.models import User
admin = User.objects.get(username='admin')
Did this help you? Please let me know with a comment. Thank you
Posted .

Comments (RSS)

Leave a comment