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