From df211454bbbfbd641690224ea8d655a71194bb3a Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 15 Apr 2018 13:20:08 -0700 Subject: [PATCH] Include username and password length requirements on form. --- .../etiquette_flask/endpoints/user_endpoints.py | 8 +++++++- frontends/etiquette_flask/templates/login.html | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/frontends/etiquette_flask/etiquette_flask/endpoints/user_endpoints.py b/frontends/etiquette_flask/etiquette_flask/endpoints/user_endpoints.py index e879567..d956c7d 100644 --- a/frontends/etiquette_flask/etiquette_flask/endpoints/user_endpoints.py +++ b/frontends/etiquette_flask/etiquette_flask/endpoints/user_endpoints.py @@ -45,7 +45,13 @@ def get_user_id_redirect(user_id): @session_manager.give_token def get_login(): session = session_manager.get(request) - return flask.render_template('login.html', session=session) + response = flask.render_template( + 'login.html', + session=session, + min_username_length=common.P.config['user']['min_length'], + min_password_length=common.P.config['user']['min_password_length'], + ) + return response @site.route('/login', methods=['POST']) @session_manager.give_token diff --git a/frontends/etiquette_flask/templates/login.html b/frontends/etiquette_flask/templates/login.html index 4669b46..f63f245 100644 --- a/frontends/etiquette_flask/templates/login.html +++ b/frontends/etiquette_flask/templates/login.html @@ -85,8 +85,8 @@ button
Register - - + +