wsgidav.samples.hg_dav_provider.HgResource.handle_delete¶
- HgResource.handle_delete()¶
Handle a DELETE request natively.
This method is called by the DELETE handler after checking for valid request syntax and making sure that there are no conflicting locks and If-headers. Depending on the return value, this provider can control further processing:
- False:
handle_delete() did not do anything. WsgiDAV will process the request by calling delete() for every resource, bottom-up.
- True:
handle_delete() has successfully performed the DELETE request. HTTP_NO_CONTENT will be reported to the DAV client.
- List of errors:
handle_delete() tried to perform the delete request, but failed completely or partially. A list of errors is returned like
[ (<ref-url>, <DAVError>), ... ]
These errors will be reported to the client.- DAVError raised:
handle_delete() refuses to perform the delete request. The DAVError will be reported to the client.
An implementation may choose to apply other semantics and return True. For example deleting ‘/by_tag/cool/myres’ may simply remove the ‘cool’ tag from ‘my_res’. In this case, the resource might still be available by other URLs, so locks and properties are not removed.
This default implementation returns
False
, so standard processing takes place.Implementation of this method is OPTIONAL.