Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
3522 Представления

Hello everybody;

I have a python function that i need to call from a js file.

But need your help to know how it works with jqwery.

Thanks a lot in advance.

Best regards.

Аватар
Отменить

Do you mean to call a controller function from the JS file?

Лучший ответ

Yes, you can do it using controller in javascript.

Make an rpc call as below inside controller:

self._rpc({
model: <your_model_name>,
method: '<your_method_name>',
args: [data[key]],
context: session.user_context,
}).done(function() {}).fail(function() {})
Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
сент. 24
14016
0
апр. 18
2378
1
июл. 19
6155
2
июл. 24
2019
1
июн. 24
4558