From 6adf6ab955838b5cfdd960dd55ab262a5b778bff Mon Sep 17 00:00:00 2001 From: oberon Date: Mon, 16 Feb 2026 16:15:55 +0100 Subject: [PATCH] fixxed template error --- app/__init__.py | 7 +++++++ templates/base.html | 20 +++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index cdd861a..018d56f 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -21,6 +21,13 @@ def create_app(): template_folder='../templates', # ← Root/templates statt app/templates static_folder='../static') # ← Root/static + from datetime import timedelta + + def timedelta_filter(td): + return str(td) # oder td.total_seconds() als Zahl + + app.jinja_env.filters['timedelta'] = timedelta_filter + # Config laden app.config.from_object('config.Config') diff --git a/templates/base.html b/templates/base.html index 449a998..7960d40 100644 --- a/templates/base.html +++ b/templates/base.html @@ -87,7 +87,18 @@ crossorigin="anonymous"> {% block scripts %} - + {% if config %} + + {% endif %} + + @@ -98,13 +109,8 @@ - +