콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
15364 화면

hi,

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

so how can i do that

아바타
취소
베스트 답변

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

아바타
취소
작성자

thanks it works for me

베스트 답변

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​

아바타
취소
관련 게시물 답글 화면 활동
2
1월 20
7663
0
11월 23
2050
2
9월 20
11969
1
11월 19
8676
0
5월 19
5146