콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
5978 화면

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

아바타
취소
관련 게시물 답글 화면 활동
1
4월 25
951
0
12월 15
6920
1
8월 22
6675
0
4월 22
3017
0
4월 22
6