From 3b3a50013572c859aae6c72ea66191388e905aca Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 2 Aug 2022 02:14:41 +0200 Subject: [PATCH] template: removed register link if registration is not enabled --- src/app.py | 2 +- src/templates/template.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 0a3a6b8..a0e522b 100644 --- a/src/app.py +++ b/src/app.py @@ -26,7 +26,7 @@ login.login_view = "login" @app.context_processor def inject_title(): return dict(title=config.TITLE, style=config.STYLE, - description=config.DESCRIPTION) + description=config.DESCRIPTION, registration=config.ALLOW_REGISTRATION) @app.errorhandler(404) diff --git a/src/templates/template.html b/src/templates/template.html index 65117d2..a2bd7fc 100644 --- a/src/templates/template.html +++ b/src/templates/template.html @@ -33,8 +33,10 @@ Made with Container Critique .
{% if current_user.is_anonymous %} Login + {% if registration %} - Register + {% endif %} {% else %} Logout -