1. 程式人生 > >修改django 後臺admin用戶的密碼

修改django 後臺admin用戶的密碼

admin pass min imp rom user models () nag

python manage.py shell
from django.contrib.auth.models import User

from django.contrib.auth.models import User
user = User.objects.get(username=‘admin‘)
user.set_password(‘[email protected]‘)
user.save()

修改django 後臺admin用戶的密碼