Re: [web2py] Re: Detecting test vs. production environments

2011-02-02 Thread Jonathan Lundell
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 wrote: >> Try t

[web2py] Re: Detecting test vs. production environments

2011-02-02 Thread Dane
Where does REMOTE_HOST live? On Feb 2, 10:46 am, Vinicius Assef wrote: > Try to check the REMOTE_HOST. > > If it is "localhost", it is local. > > > > > > > > On Wed, Feb 2, 2011 at 6:09 AM, Dane wrote: > > I'm doing something similar for configuration, but I'd really like to > > find a way to de

Re: [web2py] Re: Detecting test vs. production environments

2011-02-02 Thread Jonathan Lundell
On Feb 2, 2011, at 12:09 AM, Dane 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

Re: [web2py] Re: Detecting test vs. production environments

2011-02-02 Thread Vinicius Assef
Try to check the REMOTE_HOST. If it is "localhost", it is local. On Wed, Feb 2, 2011 at 6:09 AM, Dane 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

[web2py] Re: Detecting test vs. production environments

2011-02-02 Thread Dane
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

[web2py] Re: Detecting test vs. production environments

2011-02-02 Thread ron_m
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 remembe