aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchristian2016-08-03 16:27:57 +0200
committerchristian2016-08-03 16:27:57 +0200
commit5cd0e91c1de07b8932d0ff973660607605122bcc (patch)
tree6e91f428420d087383152fef7fcdb7450f1c7efe
parentc33d090f2067c19ea1229dad1e6b45cdb57c0612 (diff)
downloadgenenetwork2-5cd0e91c1de07b8932d0ff973660607605122bcc.tar.gz
Add settings & routing for serving Biodalliance
-rw-r--r--etc/default_settings.py3
-rw-r--r--wqflask/wqflask/views.py6
2 files changed, 9 insertions, 0 deletions
diff --git a/etc/default_settings.py b/etc/default_settings.py
index df734f7c..f3ca2e58 100644
--- a/etc/default_settings.py
+++ b/etc/default_settings.py
@@ -56,3 +56,6 @@ GENENETWORK_FILES = HOME+"/gn2_data"
PYLMM_COMMAND = str.strip(os.popen("which pylmm_redis").read())
PLINK_COMMAND = str.strip(os.popen("which plink2").read())
GEMMA_COMMAND = str.strip(os.popen("which gemma").read())
+
+
+BIODALLIANCE_PATH = os.environ['HOME']+"/dalliance"
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 70e465d1..7d3caea4 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -106,6 +106,12 @@ def tmp_page(img_path):
img_base64 = bytesarray )
+@app.route("/dalliance/<file_path>")
+def bd_files(file_path):
+ bd_path = app.config['BIODALLIANCE_PATH']
+ return send_from_directory(bd_path, file_path)
+
+
#@app.route("/data_sharing")
#def data_sharing_page():
# logger.info("In data_sharing")