Commit 0ef0218c by Clinton Blackburn

Updated production.py to update JWT_AUTH

parent 712e6a6e
......@@ -33,9 +33,22 @@ LOGGING['formatters']['syslog_format'] = {
)
}
# Keep track of the names of settings that represent dicts. Instead of overriding the values in base.py,
# the values read from disk should UPDATE the pre-configured dicts.
DICT_UPDATE_KEYS = ('JWT_AUTH',)
CONFIG_FILE = get_env_setting('COURSE_DISCOVERY_CFG')
with open(CONFIG_FILE) as f:
config_from_yaml = yaml.load(f)
# Remove the items that should be used to update dicts, and apply them separately rather
# than pumping them into the local vars.
dict_updates = {key: config_from_yaml.pop(key, None) for key in DICT_UPDATE_KEYS}
for key, value in dict_updates.items():
if value:
vars()[key].update(value)
vars().update(config_from_yaml)
DB_OVERRIDES = dict(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment