middleware.py 文件源码

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

项目:TigerHost 作者: naphatkrit 项目源码 文件源码
def process_exception(self, request, exception):
        """When we get a CasTicketException, that is probably caused by the ticket timing out.
        So logout/login and get the same page again."""
        if isinstance(exception, CasTicketException):
            do_logout(request)
            # This assumes that request.path requires authentication.
            return HttpResponseRedirect(request.path)
        else:
            return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号