修改django 后台admin用户的密码

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('Pass@word')
user.save()

posted @ 2017-10-12 15:06  雪纷飞  阅读(384)  评论(0编辑  收藏  举报