aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorBonfaceKilz2020-09-04 02:37:51 +0300
committerGitHub2020-09-04 02:37:51 +0300
commit87c607251a48c1dc212cca1671f9f2afeae37c54 (patch)
tree24fd47ba2f9431bc9cd591947839fb13197f22ea /wqflask
parent95d91538d9ac49e4d04eb5336e106c04e7bfb2fe (diff)
parentc42423f11394b2ef82684af09ed221de4ecb63d9 (diff)
downloadgenenetwork2-87c607251a48c1dc212cca1671f9f2afeae37c54.tar.gz
Merge pull request #437 from BonfaceKilz/fix/use-correct-path-give-a-path-location
Fix/use correct path give a path location
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/views.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 91d1a279..fc9949a8 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -175,13 +175,24 @@ def tmp_page(img_path):
return render_template("show_image.html",
img_base64 = bytesarray )
+
@app.route("/js/<path:filename>")
def js(filename):
- return send_from_directory(JS_GUIX_PATH, filename)
+ js_path = JS_GUIX_PATH
+ name = filename
+ if 'js_alt/' in filename:
+ js_path = js_path.replace('genenetwork2/javascript', 'javascript')
+ name = name.replace('js_alt/', '')
+ return send_from_directory(js_path, name)
@app.route("/css/<path:filename>")
def css(filename):
- return send_from_directory(CSS_PATH, filename)
+ js_path = JS_GUIX_PATH
+ name = filename
+ if 'js_alt/' in filename:
+ js_path = js_path.replace('genenetwork2/javascript', 'javascript')
+ name = name.replace('js_alt/', '')
+ return send_from_directory(js_path, name)
@app.route("/twitter/<path:filename>")
def twitter(filename):