Depending on your server and hosting environment, request.env.http_host may always return '127.0.0.1:8000' when you're using the browser based shell (in admin) or running web2py from console.
I found it was more reliable to use request.env.web2py_path which always gave a unique path (in the browser shell, while running web2py from the shell, and normally) for the server environment. I use this to detect my dev, test, or prod environment. -- 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.