标签:密码 mode plain manage string set models 忘记 key
django设置用户是python manage.py createsuperuser,但是如果忘记密码,那么应该进入shell环境 下修改
python manage.py shell
from
django.contrib.auth.models
import
User
user
=
User.objects.get(username
=
‘admin‘
)
user.set_password(
‘new_password‘
)
user.save()
标签:密码 mode plain manage string set models 忘记 key
原文地址:http://www.cnblogs.com/zhoufankui/p/6594025.html