Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
6640 Tampilan

Hello,

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

Avatar
Buang
Jawaban Terbai

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
Buang
Penulis

Thank You Mohammed

Post Terkait Replies Tampilan Aktivitas
7
Sep 21
28285
3
Sep 22
30667
2
Des 24
2108
1
Feb 22
3929
1
Feb 22
6812