İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
15278 Görünümler

hi,

i want to make one controller in that i want to access querystring from that url

so how can i do that

Avatar
Vazgeç
En İyi Yanıt

Hi


FROM CONTROLLER

if you déclare thé controller with:


def my_route(self, named_param, **kw)

     print named_param

     print kw.get('another_param')


And browse it with:

my_website/my_route?named_param=foo&another_param=bar


will output:

    foo

    bar


FROM QWEB


<t t-esc="request.params.get('another_param')" />




You can find more détails un the documentation: 

https://www.odoo.com/documentation/10.0/reference/http.html

Avatar
Vazgeç
Üretici

thanks it works for me

En İyi Yanıt

I have a problem if the foo is an object, how do I write in the url to call?
my_website/my_route?named_param=foo&another_param=bar​

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Oca 20
7574
0
Kas 23
1936
2
Eyl 20
11896
1
Kas 19
8609
0
May 19
5071