From 5ac15dbb54b96b5ad13ae22c239bb5136a8a5ce1 Mon Sep 17 00:00:00 2001 From: DannyArends Date: Wed, 9 Sep 2015 16:16:44 +0200 Subject: Fix for issue genenetwork/genenetwork2#113, I added the SESSION_TYPE and SECRET_KEY to the default config, this should be overwritten in my_settings.py --- wqflask/cfg/default_settings.py | 6 +++++- wqflask/wqflask/__init__.py | 8 +++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'wqflask') diff --git a/wqflask/cfg/default_settings.py b/wqflask/cfg/default_settings.py index 8b5d1313..2978bf37 100755 --- a/wqflask/cfg/default_settings.py +++ b/wqflask/cfg/default_settings.py @@ -14,4 +14,8 @@ SECURITY_EMAIL_SENDER = "no-reply@genenetwork.org" SECURITY_POST_LOGIN_VIEW = "/thank_you" -SQLALCHEMY_POOL_RECYCLE = 3600 \ No newline at end of file +SQLALCHEMY_POOL_RECYCLE = 3600 + +SECURITY_PASSWORD_HASH = "bcrypt" +SESSION_TYPE = "filesystem" +# SECRET_KEY = "secretkey" diff --git a/wqflask/wqflask/__init__.py b/wqflask/wqflask/__init__.py index 8e648c63..478d0a71 100755 --- a/wqflask/wqflask/__init__.py +++ b/wqflask/wqflask/__init__.py @@ -6,16 +6,14 @@ print("sys.path is:", sys.path) import jinja2 from flask import Flask - from utility import formatting app = Flask(__name__) -app.config.SECURITY_PASSWORD_HASH='bcrypt' +app.config.from_object('cfg.default_settings') # Get the defaults from cfg.default_settings +app.config.from_envvar('WQFLASK_SETTINGS') # See http://flask.pocoo.org/docs/config/#configuring-from-files -# See http://flask.pocoo.org/docs/config/#configuring-from-files -app.config.from_object('cfg.default_settings') -app.config.from_envvar('WQFLASK_SETTINGS') +print("Current application configuration:", app.config) app.jinja_env.globals.update( undefined = jinja2.StrictUndefined, -- cgit v1.2.3 From f1c99378cbc0f40297e536b24c9b7af9cbf6b330 Mon Sep 17 00:00:00 2001 From: DannyArends Date: Wed, 9 Sep 2015 16:36:59 +0200 Subject: Issue genenetwork/genenetwork2#113, forgot to uncomment the secret_key --- wqflask/cfg/default_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/cfg/default_settings.py b/wqflask/cfg/default_settings.py index 2978bf37..88159321 100755 --- a/wqflask/cfg/default_settings.py +++ b/wqflask/cfg/default_settings.py @@ -18,4 +18,4 @@ SQLALCHEMY_POOL_RECYCLE = 3600 SECURITY_PASSWORD_HASH = "bcrypt" SESSION_TYPE = "filesystem" -# SECRET_KEY = "secretkey" +SECRET_KEY = "secretkey" -- cgit v1.2.3