Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update settings for multi-machine deployment.

  • Loading branch information...
commit 9b8f6fb1820459123696b77c7f8280f04964f405 1 parent 1be2165
@coderanger coderanger authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 django_www/common_settings.py
View
4 django_www/common_settings.py
@@ -13,7 +13,7 @@
BASE = Path(__file__).absolute().ancestor(2)
# Far too clever trick to know if we're running on the deployment server.
-PRODUCTION = ('DJANGOPROJECT_DEBUG' not in os.environ) and ("djangoproject" in platform.node())
+PRODUCTION = ('DJANGOPROJECT_DEBUG' not in os.environ)
@aaugustin Owner

That breaks './manage.py runserver' in dev, not cool :-/

Just have to set the relevant env var and it should work fine.

@aaugustin Owner

That's what I did. I understand the difficulty of running in dev mode by default in dev and never in prod...

@aaugustin I think its just historical cruft, can probably be changed to default to dev mode but I defer to @jacobian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
# It's a secret to everybody
with open(BASE.parent.child('secrets.json')) as handle:
@@ -47,6 +47,8 @@
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'djangoproject',
'USER': 'djangoproject'
+ 'HOST': SECRETS.get('db_host', 'localhost'),
+ 'PASSWORD': SECRETS.get('db_password', ''),
},
}
@aaugustin

That breaks './manage.py runserver' in dev, not cool :-/

@coderanger

Just have to set the relevant env var and it should work fine.

@aaugustin

That's what I did. I understand the difficulty of running in dev mode by default in dev and never in prod...

@coderanger

@aaugustin I think its just historical cruft, can probably be changed to default to dev mode but I defer to @jacobian

Please sign in to comment.
Something went wrong with that request. Please try again.