From 154cf9fa54b087c02264002de0a2467ba4273f0d Mon Sep 17 00:00:00 2001 From: neingeist Date: Sat, 4 Dec 2021 02:29:56 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20switch=20to=20bootstrap-flask=20?= =?UTF-8?q?/=20bootstrap=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 6 ++++++ prolefeeder.py | 2 +- requirements.txt | 6 ++---- templates/base.html | 2 +- templates/download.html | 25 ++++++++++++++++--------- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/TODO.md b/TODO.md index d69f5d5..a5d61c1 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,9 @@ * check if ffmpeg is faster with less input files * close filehandle after sending? * or clean up when handling subsequent requests + +bootstrap 4 +----------- +* fix design... +* fix calendar icon +* add "Minuten" to Länge diff --git a/prolefeeder.py b/prolefeeder.py index 828b8ac..7b701ac 100644 --- a/prolefeeder.py +++ b/prolefeeder.py @@ -19,7 +19,7 @@ from config import Config app = Flask(__name__) app.config.from_object(Config) app.config['WTF_I18N_ENABLED'] = False # enables WTForms built-in translations -Bootstrap(app) +bootstrap = Bootstrap(app) attachment_filenames = {} diff --git a/requirements.txt b/requirements.txt index ac5d4f2..b365542 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,5 @@ werkzeug==0.16.1 flask -flask-bootstrap +bootstrap-flask python-dotenv - -# flask-wtf 0.14.2 is broken (enabling WTForms built-in translations does not work): -git+https://github.com/lepture/flask-wtf.git@534e1734b86c2f0907af131c11b981e6146ca57c +flask-wtf >= 1.0.0 diff --git a/templates/base.html b/templates/base.html index 2ed9de5..6a6d8c1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -17,7 +17,7 @@ -{{ utils.flashed_messages() }} +{{ utils.render_messages() }}
{% block app_content %}{% endblock %} diff --git a/templates/download.html b/templates/download.html index e26ab93..0ee9542 100644 --- a/templates/download.html +++ b/templates/download.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% import "bootstrap/wtf.html" as wtf %} +{% import "bootstrap/form.html" as wtf %} {% block head %} @@ -7,7 +7,10 @@ {% if filename is defined %} {% endif %} - + {% endblock %} {% block page_header %} @@ -27,16 +30,17 @@
{{ form.start_time.label(class_="control-label") }} -
- + - - - +
+
+
{% for error in form.start_time.errors %}

{{ error }}

@@ -65,8 +69,11 @@ {% block scripts %} {{ super() }} - - + +