middleware.py 文件源码

python
阅读 14 收藏 0 点赞 0 评论 0

项目:wiggum 作者: qdqmedia 项目源码 文件源码
def clean_id(self, request):
        """
        Allows the backend to clean the user id, if the backend defines a
        clean_id method.
        """
        backend_str = request.session[auth.BACKEND_SESSION_KEY]
        backend = load_backend(backend_str)
        try:
            user_id = backend.clean_id(request)
        except AttributeError:  # Backend has no clean_id method.
            pass
        return user_id
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号