aboutsummaryrefslogtreecommitdiff
path: root/qc_app/base_routes.py
blob: dbfcf48404e995d10b841627258f74ff91266042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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}")