bugfix/Re-brand API Manager - show logo at every page

This commit is contained in:
Marko Milić 2021-07-29 16:45:23 +02:00
parent 666560660f
commit 8445f9a8ec
2 changed files with 7 additions and 1 deletions

View File

@ -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'
],
},
},

View File

@ -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'