跳至内容
菜单
此问题已终结
1 回复
6643 查看

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
28286
3
9月 22
30670
2
12月 24
2114
1
2月 22
3929
1
2月 22
6813