From d084b546b2944fc7eb18222b67db9fa3df3272b0 Mon Sep 17 00:00:00 2001 From: MathiasDPX Date: Thu, 6 Mar 2025 20:07:04 +0100 Subject: [PATCH] fix editor not using URL from env --- routes/editor.py | 3 +- templates/editor/editor.html | 55 +++++++++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/routes/editor.py b/routes/editor.py index 2e6d602..86351fe 100644 --- a/routes/editor.py +++ b/routes/editor.py @@ -1,5 +1,6 @@ """Used for editor/editor's preview""" +import os import base64 from flask import Blueprint, request, render_template @@ -7,7 +8,7 @@ editor_routes = Blueprint('simple_page', __name__, template_folder='templates') @editor_routes.route("/editor") def editor(): - return render_template("editor/editor.html") + return render_template("editor/editor.html", hostname=os.getenv("URL")) @editor_routes.route("/preview/") @editor_routes.route("/preview/") diff --git a/templates/editor/editor.html b/templates/editor/editor.html index 924613f..87916b5 100644 --- a/templates/editor/editor.html +++ b/templates/editor/editor.html @@ -13,6 +13,59 @@ - + \ No newline at end of file