aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorDannyArends2015-09-09 16:16:44 +0200
committerDannyArends2015-09-09 16:16:44 +0200
commit5ac15dbb54b96b5ad13ae22c239bb5136a8a5ce1 (patch)
tree4a3c2c8063a324e8444e543a7828e369bdfbc991 /wqflask
parentd900509f90f18d4f11310e3caa67f90ba820ae55 (diff)
downloadgenenetwork2-5ac15dbb54b96b5ad13ae22c239bb5136a8a5ce1.tar.gz
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
Diffstat (limited to 'wqflask')
-rwxr-xr-xwqflask/cfg/default_settings.py6
-rwxr-xr-xwqflask/wqflask/__init__.py8
2 files changed, 8 insertions, 6 deletions
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,