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
评论列表
文章目录