Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4538 Visualizzazioni

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
Abbandona

------------------------------ 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 correlati Risposte Visualizzazioni Attività
2
mar 15
5373
7
feb 24
12258
0
nov 17
4061
1
nov 24
1097
2
lug 22
15002