aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/cfg/__init__.py0
-rw-r--r--wqflask/cfg/default_settings.py1
-rw-r--r--wqflask/wqflask/__init__.py4
-rw-r--r--wqflask/wqflask/search_results.py2
4 files changed, 6 insertions, 1 deletions
diff --git a/wqflask/cfg/__init__.py b/wqflask/cfg/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/wqflask/cfg/__init__.py
diff --git a/wqflask/cfg/default_settings.py b/wqflask/cfg/default_settings.py
new file mode 100644
index 00000000..30ad51d1
--- /dev/null
+++ b/wqflask/cfg/default_settings.py
@@ -0,0 +1 @@
+LOGFILE = """/tmp/flask_gn_log"""
diff --git a/wqflask/wqflask/__init__.py b/wqflask/wqflask/__init__.py
index a6119dcc..a7492e77 100644
--- a/wqflask/wqflask/__init__.py
+++ b/wqflask/wqflask/__init__.py
@@ -9,6 +9,10 @@ from utility import formatting
app = Flask(__name__)
+# See http://flask.pocoo.org/docs/config/#configuring-from-files
+app.config.from_object('cfg.default_settings')
+app.config.from_envvar('WQFLASK_SETTINGS')
+
app.jinja_env.globals.update(
numify = formatting.numify
)
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index ce7a6eef..d393d0c1 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -36,7 +36,7 @@ from utility import webqtlUtil
from dbFunction import webqtlDatabaseFunction
import logging
-logging.basicConfig(filename="/tmp/flask_gn_log", level=logging.INFO)
+logging.basicConfig(filename=app.config['LOGFILE'], level=logging.INFO)
_log = logging.getLogger("search")
_ch = logging.StreamHandler()