第一步打开django shell
python manage.py shell
第二步,找回管理员账号,一个管理员就是pk=1,依次下去
>>> from django.contrib.auth.models import User
>>> user = User.objects.get(pk=1)
>>> user
第三步找回密码
>>> from django.contrib.auth.models import User
>>> user = User.objects.get(username='yourname')
>>> user.set_password('set_pd')
>>> user.save()