Closed bluemix closed 4 years ago
I hope to update README.md to include how we can call the model's function.
I saw the controller.py file, and it has a
controller.py
@http.route( '/object/<string:model>/<string:function>', type='json', auth='user', methods=["POST"], csrf=False) def call_model_function(self, model, function, **post): args = [] kwargs = {} if "args" in post: args = post["args"] if "kwargs" in post: kwargs = post["kwargs"] model = request.env[model] result = getattr(model, function)(*args, **kwargs) return result
Thanks for your great repo/solution.
Thanks @bluemix that would be very helpful, please do.
has been updated and pull requested.
I hope to update README.md to include how we can call the model's function.
I saw the
controller.py
file, and it has aThanks for your great repo/solution.