Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6634 มุมมอง

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
How To Calculate Age From Birthday แก้ไขแล้ว
7
ก.ย. 21
28277
3
ก.ย. 22
30649
2
ธ.ค. 24
2105
1
ก.พ. 22
3925
1
ก.พ. 22
6805