base.py 文件源码

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

项目:foundation 作者: altio 项目源码 文件源码
def dispatch(self, request, *args, **kwargs):
        """ HARD OVERRIDE OF View """
        handler = self.get_handler(request, *args, **kwargs)

        # normal behavior
        if handler is None:
            if request.method.lower() in self.http_method_names:
                handler = getattr(self, request.method.lower(), None)
        if handler is None:
            handler = self.http_method_not_allowed

        # common work moment before dispatch
        handler = self.handle_common(handler, request, *args, **kwargs)

        # dispatch
        return handler(request, *args, **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号