Thanks for your reply.
The problem was when I put ip = str(request.client), when I took away str(), it the gave me correct ip address. Thanks again. G Smith On Wednesday, 4 November 2015 22:38:17 UTC, Dave S wrote: > > > > On Wednesday, November 4, 2015 at 7:13:16 AM UTC-8, Garry Smith wrote: >> >> Hi >> Thanks for the reply, the session.time was left in my mistake, >> I tried it without the session and it still gave me the same error, I >> have tried your suggestion and is working. >> The only problem I am having know is the request.client is sending a ip >> of 127.0.0.1, which ever client pc I use. >> This is only being used on a intranet and should pick up a 10.1.2.* as >> the ip. >> >>> >>> > 127.0.0.1 is localhost, and if you're testing this code from a browser > running on the machine that runs web2py, that's what you'd expect. If > your browser is on a different machine, then I can't explain it without > seeing more details. You might be able to use the debugging toolbar to see > what you've got in your view: > > {{=response.toolbar()}} > > > <URL:http://web2py.com/books/default/chapter/29/03/overview#Debugging-toolbar> > > > I am quite fond, by the way, of using the CAT() helper when my controller is > building up a string from pieces of "stuff". > > > HTH > > > /dps > > > > > > On Wednesday, 4 November 2015 22:38:17 UTC, Dave S wrote: > > > > On Wednesday, November 4, 2015 at 7:13:16 AM UTC-8, Garry Smith wrote: >> >> Hi >> Thanks for the reply, the session.time was left in my mistake, >> I tried it without the session and it still gave me the same error, I >> have tried your suggestion and is working. >> The only problem I am having know is the request.client is sending a ip >> of 127.0.0.1, which ever client pc I use. >> This is only being used on a intranet and should pick up a 10.1.2.* as >> the ip. >> >>> >>> > 127.0.0.1 is localhost, and if you're testing this code from a browser > running on the machine that runs web2py, that's what you'd expect. If > your browser is on a different machine, then I can't explain it without > seeing more details. You might be able to use the debugging toolbar to see > what you've got in your view: > > {{=response.toolbar()}} > > > <URL:http://web2py.com/books/default/chapter/29/03/overview#Debugging-toolbar> > > > I am quite fond, by the way, of using the CAT() helper when my controller is > building up a string from pieces of "stuff". > > > HTH > > > /dps > > > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.