用Django shell:1python manage.py shell然后获取你的用户名,并且重设密码:1234from django.contrib.auth.models import User user = User.objects.get(username='admin') user.set_password('new_password') user.save()