Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
6626 Zobrazení

Hello,

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

Avatar
Zrušit
Nejlepší odpověď

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šit
Autor

Thank You Mohammed

Related Posts Odpovědi Zobrazení Aktivita
7
zář 21
28277
3
zář 22
30644
2
pro 24
2103
1
úno 22
3923
1
úno 22
6802