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
This commit is contained in:
parent
2f7a2dd891
commit
48a257185b
@ -190,7 +190,7 @@ def jstemplate(parser, token):
|
||||
|
||||
@register.assignment_tag
|
||||
def load_config():
|
||||
return conf.HORIZON_CONFIG
|
||||
return conf
|
||||
|
||||
|
||||
@register.assignment_tag
|
||||
|
@ -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 @@
|
||||
</div>
|
||||
<div id="links">
|
||||
{% block links %}
|
||||
<p><a href="/">{% trans "Home" %}</a></p>
|
||||
<p><a href="{{ HORIZON_CONFIG.help_url }}">{% trans "Help" %}</a></p>
|
||||
<p><a href="{{ CONF.WEBROOT }}">{% trans "Home" %}</a></p>
|
||||
<p><a href="{{ CONF.HORIZON_CONFIG.help_url }}">{% trans "Help" %}</a></p>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user