Currently we have production.py and local.py files. For a config var, say FACEBOOK_API_SECRET we then have
FACEBOOK_API_SECRET = os.environ.get('FACEBOOK_API_SECRET')
for production.py, and
FACEBOOK_API_SECRET = 'some development secret'
for local.py.
Instead we could put all os.environ.get config in the common.py . Any environment variables can be set on local in a .env file like
export SENDGRID_SECRET='another secret'
export FACEBOOK_API_SECRET='some development secret'
and in make run we can add a call source .env to load the environment variables.
The benefit would be that the config will be less error prone (from adding a config variable in local and not updating it in production, or changing the name of one and not the other).
Currently we have
production.pyandlocal.pyfiles. For a config var, say FACEBOOK_API_SECRET we then havefor
production.py, andfor
local.py.Instead we could put all os.environ.get config in the common.py . Any environment variables can be set on local in a
.envfile likeand in make run we can add a call
source .envto load the environment variables.The benefit would be that the config will be less error prone (from adding a config variable in local and not updating it in production, or changing the name of one and not the other).