clients.py 文件源码

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

项目:apimas 作者: grnet 项目源码 文件源码
def partial_update(self, resource_id, raise_exception=True, headers=None,
                       data=None):
        """
        Method for the partial update of resource, i.e. only a part of the
        resource's fields are updated.

        Example: PATCH endpoint/<pk>/
        """
        request_kwargs = {
            'headers': headers,
            'auth': self.auth,
        }
        request_kwargs.update(self.extract_write_data(
            data, raise_exception, partial=True))
        r = requests.patch(self.format_endpoint(resource_id), **request_kwargs)
        return r
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号