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

Hello,

     I need to know that how to call function through URL?

아바타
취소
베스트 답변

You can call a funtion from url using http.route

for example call a function from url www.domain.com/web/my/home

@http.route(['/my/home'], type='http', auth="public", website=True)
def your_function(self, **kw):
     # your code

or if you want to call a function defined inside a model use this inside your function

request.env['your.model'].function_name()


아바타
취소
작성자

Thank You Mohammed

관련 게시물 답글 화면 활동
7
9월 21
28476
3
9월 22
30852
2
12월 24
2287
1
2월 22
4038
1
2월 22
6969