Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
8972 Lượt xem

Hi, I wonder if there is any way to get the parameters of the session from python code.

My intention is to determine the client's IP, scanning the meeting OpenERP code in the main.py file in addons \ web \ controllers \ there is a method called authenticate and stored in the selft.session_info (thing) the information about the remote IP 'REMOTE_ADDR'.

there any way to get from the python code that session_info information?.

thanks

Ảnh đại diện
Huỷ bỏ

req = httplib2.Http() webauth = self.url + "/web/session/get_session_info" body ={"jsonrpc":"2.0","method":"call","params":{"session_id":self.session_id,"context":{}},"id":"r1"} headers = {"Content-Type": "Application/json"} resp, content = req.request(webauth, "POST", json.dumps(body), headers)

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 9 20
5781
1
thg 9 18
7616
0
thg 8 15
19252
1
thg 3 15
7312
1
thg 5 22
10381