aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwqflask/base/data_set.py3
-rwxr-xr-xwqflask/cfg/default_settings.py6
-rwxr-xr-xwqflask/wqflask/__init__.py8
3 files changed, 10 insertions, 7 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index e98258f6..e2db9ad7 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -1171,7 +1171,8 @@ class MrnaAssayDataSet(DataSet):
mean = result[0] if result else 0
- this_trait.mean = "%2.3f" % mean
+ if mean:
+ this_trait.mean = "%2.3f" % mean
#LRS and its location
this_trait.LRS_score_repr = 'N/A'
diff --git a/wqflask/cfg/default_settings.py b/wqflask/cfg/default_settings.py
index 8b5d1313..88159321 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,