aboutsummaryrefslogtreecommitdiff
path: root/uploader/base_routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/base_routes.py')
-rw-r--r--uploader/base_routes.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/uploader/base_routes.py b/uploader/base_routes.py
index 88247b2..742a254 100644
--- a/uploader/base_routes.py
+++ b/uploader/base_routes.py
@@ -1,15 +1,16 @@
"""Basic routes required for all pages"""
import os
+from urllib.parse import urljoin
-from flask import (
- Blueprint,
- render_template,
- current_app as app,
- send_from_directory)
+from flask import (Blueprint,
+ current_app as app,
+ send_from_directory)
+from uploader.ui import make_template_renderer
from uploader.oauth2.client import user_logged_in
base = Blueprint("base", __name__)
+render_template = make_template_renderer("home")
@base.route("/favicon.ico", methods=["GET"])
@@ -23,7 +24,9 @@ def favicon():
@base.route("/", methods=["GET"])
def index():
"""Load the landing page"""
- return render_template("index.html" if user_logged_in() else "login.html")
+ return render_template("index.html" if user_logged_in() else "login.html",
+ gn2server_intro=urljoin(app.config["GN2_SERVER_URL"],
+ "/intro"))
def appenv():
"""Get app's guix environment path."""