renderers.py 文件源码

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

项目:jianshu-api 作者: strugglingyouth 项目源码 文件源码
def show_form_for_method(self, view, method, request, obj):
        """
        Returns True if a form should be shown for this method.
        """
        if method not in view.allowed_methods:
            return  # Not a valid method

        try:
            view.check_permissions(request)
            if obj is not None:
                view.check_object_permissions(request, obj)
        except exceptions.APIException:
            return False  # Doesn't have permissions
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号