Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
4525 Tampilan

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

Avatar
Buang

------------------------------ 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')

Post Terkait Replies Tampilan Aktivitas
2
Mar 15
5359
7
Feb 24
12253
0
Nov 17
4053
1
Nov 24
1088
2
Jul 22
14997