def filter_method(self, request): """ Raise 405 whenever http method is patch """ if request.method == "PATCH": raise MethodNotAllowed("PATCH")