Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
6618 Vizualizări

Hello,

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

Imagine profil
Abandonează
Cel mai bun răspuns

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


Imagine profil
Abandonează
Autor

Thank You Mohammed

Related Posts Răspunsuri Vizualizări Activitate
7
sept. 21
28276
3
sept. 22
30634
2
dec. 24
2102
1
feb. 22
3922
1
feb. 22
6798