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

I want to store the remote Ip address(client) in my DB. or I now that http.py has client ip address but how can i get the client ip address in my customized py file

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

------------------------------ in xml file --------------------------------

<script> $(document).ready(function(){ $(document).delegate(".oe_form_button_edit , .oe_list_add , .oe_form_button_create ",'click',function() { ipfill(); });

function ipfill() { $.getJSON("http://smart-ip.net/geoip-json?callback=?", function(data){ $('.ipcaptuaring').children().val(data.host); }); } ipfill(); }); </script>

<field name="ipaddress" class="ipcaptuaring"/>

---------------------in py file -----------------------------------

'ipaddress':fields.char('ip Address')

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 15
5359
7
thg 2 24
12253
0
thg 11 17
4054
1
thg 11 24
1089
2
thg 7 22
14997