Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
5943 Prikazi

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!

Avatar
Opusti
Avtor Best Answer

And can I call a python function using this method?

Avatar
Opusti
Best Answer

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

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
apr. 25
932
0
dec. 15
6903
1
avg. 22
6646
0
apr. 22
2988
0
apr. 22
6