Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
5971 Переглядів

Hi everyone, I'm designing my company's website and I need to solve this doubt.

I have created a template with a (button / input(type=button)) and I need to detect in my python file, when the button is clicked for realize some actions. Any help?

I'm using the next code in the template:

<div id="insertar">
<button id="btn_insert_economic_data" type="button"
class="btn btn-success">Insert data</button>
</div>

And the next one in the python file:

@http.route(['/my/economic_data/delete/<int:data>'], type='http', auth="user",
website=True)
def portal_delete_economic_data(self, data=None, access_token=None, **kw):

......

Thanks for reading!

Аватар
Відмінити
Автор Найкраща відповідь

And can I call a python function using this method?

Аватар
Відмінити
Найкраща відповідь

use javascript for button click and the invoke this method from that particular action

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
квіт. 25
947
0
груд. 15
6917
1
серп. 22
6666
0
квіт. 22
3008
0
квіт. 22
6