Hello, can you give me an example for getting a value from python to javascript?
I always get across browser origin error.
I tried to get a value from this:
.py
@http.route('/custom/test', type='json', auth="public", methods=['POST'], website=True)
def person(self, lastname, firstname):
headers = {'Content-Type': 'application/json'}
create_user_url = "http://localhost:8090/custom_custom/user"
data = {"jsonrpc": 2.0, "params": {"lastname": lastname, "firstname": firstname} }
.js
if (result) { session.rpc('/custom/test', { lastname : // how to get the data from python? firstname: // how to get the data from python? }).then(function (result) { console.log("print user")
});
}