From b91bfb09ea29d7ce3e8208dc68878b8d96e55292 Mon Sep 17 00:00:00 2001 From: Wesley Kerfoot Date: Sat, 14 Sep 2019 12:43:22 -0400 Subject: [PATCH] Use env vars for config --- app/website.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/website.py b/app/website.py index 4301960..34bf46d 100755 --- a/app/website.py +++ b/app/website.py @@ -46,9 +46,9 @@ def cacheit(key, thunk): def get_posts(): posts = getattr(g, "posts", None) if posts is None: - posts = g._posts = Posts(app.config["COUCHDB_USER"], - app.config["COUCHDB_PASSWORD"], - app.config["COUCHDB_NAME"]) + posts = g._posts = Posts(app.config.from_envvar("COUCHDB_USER"), + app.config.from_envvar("COUCHDB_PASSWORD"), + app.config.from_envvar("COUCHDB_NAME")) return posts def get_initial():