Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
5721 Ansichten

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
Verwerfen
Autor Beste Antwort

And can I call a python function using this method?

Avatar
Verwerfen
Beste Antwort

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

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Apr. 25
607
0
Dez. 15
6656
1
Aug. 22
6488
0
Apr. 22
2743
0
Apr. 22
6