Report version on error page

This commit is contained in:
magmaus3 2022-10-31 17:56:19 +01:00
parent 96838452a8
commit 0d6b8e55bc
Signed by: magmaus3
GPG key ID: 966755D3F4A9B251
2 changed files with 3 additions and 0 deletions

View file

@ -9,6 +9,7 @@ import json
import os import os
import re import re
from . import utils from . import utils
from . import __version__
basedir = os.path.dirname(__file__) basedir = os.path.dirname(__file__)
app = FastAPI() app = FastAPI()
app.mount("/static", StaticFiles(directory=basedir + "/static"), name="static") 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['convert_times'] = utils.convert_times
template_env.globals['__version__'] = __version__
BASE_URL = "http://make.fangam.es" BASE_URL = "http://make.fangam.es"
THUMB_URL = "https://images.make.fangam.es" THUMB_URL = "https://images.make.fangam.es"

View file

@ -18,6 +18,7 @@
<details> <details>
<summary>More details</summary> <summary>More details</summary>
<pre>{{ details }}</pre> <pre>{{ details }}</pre>
<pre>Version: {{ __version__ }}</pre>
</details> </details>
{% endif %} {% endif %}
</div> </div>