Skip to Content
Menu
This question has been flagged
1 Odpoveď
6648 Zobrazenia

Hello,

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

Avatar
Zrušiť
Best Answer

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()


Avatar
Zrušiť
Autor

Thank You Mohammed

Related Posts Replies Zobrazenia Aktivita
7
sep 21
28289
3
sep 22
30677
2
dec 24
2116
1
feb 22
3933
1
feb 22
6822