On Feb 2, 2011, at 5:29 PM, Dane wrote: > > Where does REMOTE_HOST live?
Try request.env.remote_host Keep in mind that remote_host is the host of the browser, not web2py. request.env.http_host is the host that the request is directed to. > > On Feb 2, 10:46 am, Vinicius Assef <vinicius...@gmail.com> wrote: >> Try to check the REMOTE_HOST. >> >> If it is "localhost", it is local. >> >> >> >> >> >> >> >> On Wed, Feb 2, 2011 at 6:09 AM, Dane <dane.schnei...@gmail.com> wrote: >>> I'm doing something similar for configuration, but I'd really like to >>> find a way to detect this setting automatically instead of setting a >>> flag which just adds needless complexity to my git deployments. All I >>> really need is a way to reliably check the full url of my app as the >>> client sees it, and I need it to be available when the first models >>> are being exec'd. >> >>> On Feb 2, 3:01 am, ron_m <ron.mco...@gmail.com> wrote: >>>> I put all my production vs developer settings in an if else block and use >>>> my >>>> own variable PRODUCTION. This is in the model directory and named >>>> 0_customization.py in my case. This allows you to set the migrate, >>>> local_import reload parameter and anything else you want. Then I just need >>>> to remember to set the flag True or False depending on the situation. >> >>>> RMMV >> >>>> Ron