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