From 48a257185b7d6eb20a438f62bba7ff3d3b67a0b2 Mon Sep 17 00:00:00 2001 From: Sam Betts Date: Mon, 30 Mar 2015 13:55:28 +0100 Subject: [PATCH] Use WEBROOT setting for the 500 page home button The home button on the 500 page currently links to "/" which is not always the true app root, in settings we define a WEBROOT variable so that we can inform the app of its actual location. This patch uses that variable to set href location for the home link on the 500 page, so it will be acurate for all cases. To make this possible the load_conf template tag now returns conf itself instead of conf.HORIZON_CONFIG giving the template access to more of the settings including WEBROOT. Change-Id: I9d42ac8eeb7f2bf558ba86440fd5ae85ef591568 Closes-Bug: 1427903 --- horizon/templatetags/horizon.py | 2 +- openstack_dashboard/templates/500.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/horizon/templatetags/horizon.py b/horizon/templatetags/horizon.py index 57bdec6307..2e51f907b1 100644 --- a/horizon/templatetags/horizon.py +++ b/horizon/templatetags/horizon.py @@ -190,7 +190,7 @@ def jstemplate(parser, token): @register.assignment_tag def load_config(): - return conf.HORIZON_CONFIG + return conf @register.assignment_tag diff --git a/openstack_dashboard/templates/500.html b/openstack_dashboard/templates/500.html index fb51211cf0..9bef4d1a3c 100644 --- a/openstack_dashboard/templates/500.html +++ b/openstack_dashboard/templates/500.html @@ -1,7 +1,7 @@ {% load branding i18n staticfiles %} {% load load_config from horizon %} -{% load_config as HORIZON_CONFIG %} +{% load_config as CONF %} {% comment %} @@ -70,8 +70,8 @@