From 0d6b8e55bcc3b82b2f401e6805a37ebf6a9bf131 Mon Sep 17 00:00:00 2001 From: magmaus3 Date: Mon, 31 Oct 2022 17:56:19 +0100 Subject: [PATCH] Report version on error page --- iwm_browser/main.py | 2 ++ iwm_browser/templates/error.html | 1 + 2 files changed, 3 insertions(+) diff --git a/iwm_browser/main.py b/iwm_browser/main.py index 2046143..b845436 100644 --- a/iwm_browser/main.py +++ b/iwm_browser/main.py @@ -9,6 +9,7 @@ import json import os import re from . import utils +from . import __version__ basedir = os.path.dirname(__file__) app = FastAPI() app.mount("/static", StaticFiles(directory=basedir + "/static"), name="static") @@ -19,6 +20,7 @@ template_env = jinja2.Environment( ) template_env.globals['convert_times'] = utils.convert_times +template_env.globals['__version__'] = __version__ BASE_URL = "http://make.fangam.es" THUMB_URL = "https://images.make.fangam.es" diff --git a/iwm_browser/templates/error.html b/iwm_browser/templates/error.html index 9776f8c..4ab7e6f 100644 --- a/iwm_browser/templates/error.html +++ b/iwm_browser/templates/error.html @@ -18,6 +18,7 @@
More details
{{ details }}
+
Version: {{ __version__ }}
{% endif %}