From ddfcb0a5e454e66d4a638323daa061c668f29a78 Mon Sep 17 00:00:00 2001 From: wez3 Date: Sat, 14 Jan 2017 18:41:06 +0100 Subject: [PATCH 1/2] Remove unnecessary code from footer_login.html --- templates/footer_login.html | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/templates/footer_login.html b/templates/footer_login.html index 0be7258..308b1d0 100644 --- a/templates/footer_login.html +++ b/templates/footer_login.html @@ -1,16 +1,2 @@ - -
- -
-
-
- - - - - - - From 20fa2715f2967adc49fea88572b9028fab5cec22 Mon Sep 17 00:00:00 2001 From: wez3 Date: Sat, 14 Jan 2017 19:42:29 +0100 Subject: [PATCH 2/2] Add login failed message at login screen --- server.py | 2 +- templates/login.html | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index f83da6e..edafd95 100755 --- a/server.py +++ b/server.py @@ -89,7 +89,7 @@ def login_form(): if g.users[username].authenticate(request.form['password']): security.generateCsrfToken() return redirect(url_for('dashboard')) - return render_template('login.html') + return render_template('login.html', failed = "Login failed") return render_template('login.html') @app.errorhandler(404) diff --git a/templates/login.html b/templates/login.html index 9fcc3a2..992544d 100644 --- a/templates/login.html +++ b/templates/login.html @@ -23,7 +23,7 @@
Login
-
+
@@ -36,6 +36,11 @@
+ {% if failed %} +
+ {{failed}} +
+ {% endif %}