1.python manage.py shell

2.from django.contrib.auth.models import User

InitialUsername = User.objects.get(username=username)
InitialUsername.set_password(new_password)
InitialUsername.save()

或者

1.python manage.py changepassword username

相关文章:

  • 2021-12-15
  • 2022-12-23
  • 2021-10-11
  • 2021-12-06
  • 2021-06-12
  • 2021-11-16
  • 2022-12-23
  • 2021-05-13
猜你喜欢
  • 2021-07-23
  • 2022-12-23
  • 2021-11-12
  • 2021-12-03
  • 2022-12-23
相关资源
相似解决方案