Browse files

Update settings for multi-machine deployment.

  • Loading branch information...
1 parent 1be2165 commit 9b8f6fb1820459123696b77c7f8280f04964f405 @coderanger coderanger committed Oct 18, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 django_www/
4 django_www/
@@ -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())
aaugustin Feb 4, 2014 Django member

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

coderanger Feb 4, 2014

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

aaugustin Feb 5, 2014 Django member

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

coderanger Feb 5, 2014

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

# 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', ''),

0 comments on commit 9b8f6fb

Please sign in to comment.