Browse Source

Use env vars for config

master
Wesley Kerfoot 5 years ago
parent
commit
b91bfb09ea
  1. 6
      app/website.py

6
app/website.py

@ -46,9 +46,9 @@ def cacheit(key, thunk):
def get_posts(): def get_posts():
posts = getattr(g, "posts", None) posts = getattr(g, "posts", None)
if posts is None: if posts is None:
posts = g._posts = Posts(app.config["COUCHDB_USER"], posts = g._posts = Posts(app.config.from_envvar("COUCHDB_USER"),
app.config["COUCHDB_PASSWORD"], app.config.from_envvar("COUCHDB_PASSWORD"),
app.config["COUCHDB_NAME"]) app.config.from_envvar("COUCHDB_NAME"))
return posts return posts
def get_initial(): def get_initial():

Loading…
Cancel
Save