修改管理员密码

code

macname@MacdeMBP ibook % python3 manage.py shell
Python 3.7.4 (v3.7.4:e09359112e, Jul  8 2019, 14:54:52) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.contrib.auth.models import User
>>> user =User.objects.get(username='root')
>>> user.set_password('11111111')
>>> user.save() 
>>> 
>>> 
>>> 

 

 

 

 

 

 

 

 

posted @ 2020-12-24 00:21  anobscureretreat  阅读(123)  评论(0编辑  收藏  举报