Skip to content
This repository was archived by the owner on Sep 19, 2018. It is now read-only.

Commit 1d1b90b

Browse files
committed
Added check if ENVIRONMENT variable is actually set before reading it
1 parent 1031286 commit 1d1b90b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

codeweekeu/settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,5 +550,6 @@
550550
pass
551551

552552
# if we're running on the server, use server specific settings
553-
if os.environ['ENVIRONMENT'] == 'production':
553+
ENVIRONMENT = os.getenv('ENVIRONMENT', 'development')
554+
if ENVIRONMENT == 'production':
554555
from settings_production import *

codeweekeu/settings_production.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import dj_database_url
33
import os
44

5+
print "in production mode"
6+
57
DEBUG = False
68

79
dbconfig = dj_database_url.config()

0 commit comments

Comments
 (0)