Forwards LOGOUT_URL to templates.

Uses the openstack context preprocessor to pass
the LOGOUT_URL from settings to templates and
changes the 'Sign out' menu entry to redirect to it
instead of the logout view directly.

closes-bug: #1747149
Change-Id: Id17ffca6b5e24779433c3f19d009bb2a77f7b901
This commit is contained in:
Marek 2019-09-20 09:46:03 +02:00
parent bcdff69221
commit a11aa7ff62
2 changed files with 2 additions and 1 deletions

View File

@ -87,6 +87,7 @@ def openstack(request):
context['WEBROOT'] = settings.WEBROOT
context['USER_MENU_LINKS'] = settings.USER_MENU_LINKS
context['LOGOUT_URL'] = settings.LOGOUT_URL
# Adding profiler support flag
profiler_settings = settings.OPENSTACK_PROFILER

View File

@ -59,7 +59,7 @@
{% endif %}
<li class="divider"></li>
<li>
<a href="{% url 'logout' %}" target="_self">
<a href="{{ LOGOUT_URL }}" target="_self">
<span class="fa fa-sign-out"></span>
{% trans "Sign Out" %}
</a>