def patch(self, request, id=None): if id is not None: return patch_file(request, self.Model, id) else: return api.invalid_endpoint()
def post(self, request, id=None): if id is not None: return api.invalid_endpoint() else: return create_file(request, self.Model)
def delete(self, request, id=None): if id is not None: return delete_file(request, self.Model, id) else: return api.invalid_endpoint()
def _not_implemented(request, *args, **kwargs): return api.invalid_endpoint()
def put(self, request, pk=None): if pk is not None: return self._update_method(request, pk) else: return api.invalid_endpoint()
def patch(self, request, pk=None): if pk is not None: return self._patch_method(request, pk) else: return api.invalid_endpoint()
def delete(self, request, pk=None): if pk is not None: return self._delete_method(request, pk) else: return api.invalid_endpoint()
def post(self, request, pk=None): if pk is not None: return api.invalid_endpoint() return self._create_method(request)