aboutsummaryrefslogtreecommitdiff
path: root/qc_app/base_routes.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-12 14:46:45 -0500
committerFrederick Muriuki Muriithi2024-06-12 14:49:59 -0500
commit103c4bc302f8c3038b9084aa2126a75db1261cd6 (patch)
tree0279797417fe9bd90d6f4bf7081b2f6f7c4022c7 /qc_app/base_routes.py
parent5e96d27f3d96c84fc5a15d7040843b379b701d20 (diff)
downloadgn-uploader-103c4bc302f8c3038b9084aa2126a75db1261cd6.tar.gz
Use bundled bootstrap for styling the UI
Use bootstrap to eliminate a myriad of UI styling headaches.
Diffstat (limited to 'qc_app/base_routes.py')
-rw-r--r--qc_app/base_routes.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/qc_app/base_routes.py b/qc_app/base_routes.py
new file mode 100644
index 0000000..dbfcf48
--- /dev/null
+++ b/qc_app/base_routes.py
@@ -0,0 +1,15 @@
+"""Basic routes required for all pages"""
+import os
+from flask import Blueprint, send_from_directory
+
+base = Blueprint("base", __name__)
+
+def appenv():
+ """Get app's guix environment path."""
+ return os.environ.get("GN_UPLOADER_ENVIRONMENT")
+
+@base.route("/bootstrap/<path:filename>")
+def bootstrap(filename):
+ """Fetch bootstrap files."""
+ return send_from_directory(
+ appenv(), f"share/genenetwork2/javascript/bootstrap/{filename}")