implements #4, use env to configure app

This commit is contained in:
Matthew Scragg 2014-09-29 15:22:20 -05:00
parent 675ec9c9f9
commit 2895308667
5 changed files with 48 additions and 41 deletions

View file

@ -82,6 +82,13 @@ LOCKED = WIKI_LOCKED_PAGES
ROOT_ENDPOINT = 'wiki.page'
__env = {}
for k, v in os.environ.items():
if k.startswith('REALMS_'):
__env[k[7:]] = v
globals().update(__env)
try:
with open(os.path.join(APP_PATH, 'config.json')) as f:
__settings = json.load(f)