I handle local settings and production settings in the same
settings.py file:
I group the settings that differ under
if os.environ['SERVER_SOFTWARE'].startswith('Dev'):
[development specific settings]
else:
[server specific settings]
that way you don't have to worry about two files
-John
O
On Dec 10, 1:33 pm, "Nick Johnson (Google)"
wrote:
> Hi Alex,
>
> On Thu, Dec 10, 2009 at 11:20 AM, Alex Popescu <
>
>
>
>
>
> the.mindstorm.mailingl...@gmail.com> wrote:
> > Hi Nick,
>
> > On Dec 9, 1:58 pm, "Nick Johnson (Google)"
> > wrote:
> > > Hi Alex,
>
> > > The standard way to determin
Hi Alex,
On Thu, Dec 10, 2009 at 11:20 AM, Alex Popescu <
the.mindstorm.mailingl...@gmail.com> wrote:
> Hi Nick,
>
> On Dec 9, 1:58 pm, "Nick Johnson (Google)"
> wrote:
> > Hi Alex,
> >
> > The standard way to determine if you are running on the development
> server
> > is this:
> > DEBUG = os.e
Hi Nick,
On Dec 9, 1:58 pm, "Nick Johnson (Google)"
wrote:
> Hi Alex,
>
> The standard way to determine if you are running on the development server
> is this:
> DEBUG = os.environ['SERVER_SOFTWARE'].startswith('Dev')
>
Awesome! That's exactly what I was looking for.
> Are you sure there has be
On Dec 9, 6:01 am, dburns wrote:
> One crude way to tell if you're running locally or not:
>
> if self.request.host_url != "http://localhost:8080":
> # Assume live server
>
That's a good idea but it applies only at the request/response level.
What I need is something at the application/startup
One crude way to tell if you're running locally or not:
if self.request.host_url != "http://localhost:8080":
# Assume live server
On Dec 8, 6:28 pm, Alex Popescu
wrote:
> On Dec 9, 1:25 am, Alex Popescu
> wrote:
>
>
>
> > Hi guys,
>
> > I am wondering if there is a 'recommended' solution for
On Dec 9, 1:25 am, Alex Popescu
wrote:
> Hi guys,
>
> I am wondering if there is a 'recommended' solution for enabling a set
> of URIs when the app is running locally for testing purposes.
>
> Until recently I had a setup which was defining additional URI
> mappings in a _localsettings.py module a