摘要:
python manage.py shellfrom django.contrib.auth.models import Useruser = User.objects.get(username='admin')user.set_password('new_password')user.save() 阅读全文
摘要:
为了简化开发流程,使用了django 的用户管理机制。项目中需要实现sso单点登录,保障系统能够整合到原有旧平台中。(1)在app中添加authbackend.py 。 yourapp/auth_backend.pyfrom django.contrib.auth.backends import M... 阅读全文