From 8445f9a8ec3ce5303e1236d7ff78fde3850dcadc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Thu, 29 Jul 2021 16:45:23 +0200 Subject: [PATCH] bugfix/Re-brand API Manager - show logo at every page --- apimanager/apimanager/settings.py | 3 ++- apimanager/base/context_processors.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apimanager/apimanager/settings.py b/apimanager/apimanager/settings.py index 7d2d9ca..61538b0 100644 --- a/apimanager/apimanager/settings.py +++ b/apimanager/apimanager/settings.py @@ -106,7 +106,8 @@ TEMPLATES = [ 'base.context_processors.api_username', 'base.context_processors.api_user_id', 'base.context_processors.api_tester_url', - 'base.context_processors.portal_page' + 'base.context_processors.portal_page', + 'base.context_processors.logo_url' ], }, }, diff --git a/apimanager/base/context_processors.py b/apimanager/base/context_processors.py index 7edd1c6..7585fdf 100644 --- a/apimanager/base/context_processors.py +++ b/apimanager/base/context_processors.py @@ -23,6 +23,11 @@ def portal_page(request): return {'API_PORTAL': settings.API_PORTAL} +def logo_url(request): + """Returns the configured LOGO_URL""" + return {'logo_url': settings.LOGO_URL} + + def api_username(request): """Returns the API username/email of the logged-in user""" nametodisplay = 'not authenticated'