diff --git a/Services/Interfaces/web_interface/advanced_templates/advanced_index.html b/Services/Interfaces/web_interface/advanced_templates/advanced_index.html index 1c8dca6b1..b75896814 100644 --- a/Services/Interfaces/web_interface/advanced_templates/advanced_index.html +++ b/Services/Interfaces/web_interface/advanced_templates/advanced_index.html @@ -4,6 +4,15 @@

Welcome to OctoBot's advanced interface

+ {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} +
+ {{ message }} +
+ {% endfor %} + {% endif %} + {% endwith %}
This interface is providing insights on some OctoBot advanced concepts and should be used once OctoBot basic features are understood. diff --git a/Services/Interfaces/web_interface/login/web_login_manager.py b/Services/Interfaces/web_interface/login/web_login_manager.py index c71f0f40d..223778070 100644 --- a/Services/Interfaces/web_interface/login/web_login_manager.py +++ b/Services/Interfaces/web_interface/login/web_login_manager.py @@ -105,10 +105,10 @@ def active_login_required(func): def decorated_view(*args, **kwargs): if is_login_required(): return _login_required_func(func, *args, **kwargs) - flask.flash("For security reasons, please enable password authentication in " - "accounts configuration to use this page.", + flask.flash(f"For security reasons, please enable password authentication in " + f"accounts configuration to use the {flask.request.path} page.", category=flask_login.LOGIN_MESSAGE_CATEGORY) - return flask.redirect(flask.current_app.login_manager.login_view) + return flask.redirect('home') return decorated_view