aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorBonfaceKilz2021-07-26 13:22:38 +0300
committerBonfaceKilz2021-08-03 15:49:50 +0300
commitf5b0a59a41b1cf3b29557aa918b217b0749879b8 (patch)
treea9284124721a778360fbb6b170ba0a1b2dbe489e /wqflask
parent5e61c115a2c2be351c16fd9d1a764faecd8591fa (diff)
downloadgenenetwork2-f5b0a59a41b1cf3b29557aa918b217b0749879b8.tar.gz
wqflask: views: Return the json data for viewing
* wqflask/wqflask/views.py (display_file): New function.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 1d50bdff..12b47ce9 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -1426,3 +1426,9 @@ def approve_data(name):
f"{name}.approved"))
return redirect("/data/approve/")
+
+@app.route("/display-file/<name>")
+def display_file(name):
+ with open(os.path.join("/tmp/sample-data/diffs", name), 'r') as myfile:
+ content = myfile.read()
+ return Response(content, mimetype='text/json')