Commit ceb2c86d authored by Maël Kervella's avatar Maël Kervella

Fix #60: Change context variable so it does not get overriden by django-auth views

parent 55c1da24
......@@ -42,6 +42,8 @@ def context_user(request):
return {
'request_user': user,
'interfaces': interfaces,
'site_name': GeneralOption.get_cached_value('site_name'),
# Must takes a different name because djang.auth.contrib.views.login()
# overrides 'site_name' context variable.
'name_website': GeneralOption.get_cached_value('site_name'),
'ipv6_enabled': OptionalMachine.get_cached_value('ipv6'),
}
......@@ -44,8 +44,8 @@ msgstr "Accueil"
#: templates/re2o/index.html:33
#, python-format
msgid "Welcome to %(site_name)s !"
msgstr "Bienvenue sur %(site_name)s !"
msgid "Welcome to %(name_website)s !"
msgstr "Bienvenue sur %(name_website)s !"
#: templates/re2o/index.html:47
msgid "Go there"
......
......@@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block title %}{% trans "Home" %}{% endblock %}
{% block content %}
<h1>{% blocktrans %}Welcome to {{ site_name }} !{% endblocktrans %}</h1>
<h1>{% blocktrans %}Welcome to {{ name_website }} !{% endblocktrans %}</h1>
<div class="row">
{% for service_list in services_urls %}
......
......@@ -56,7 +56,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<link rel="stylesheet" href="{% static 'css/base.css' %}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/svg" href="{% static 'images/logo_re2o.svg' %}">
<title>{{ site_name }} : {% block title %}Accueil{% endblock %}</title>
<title>{{ name_website }} : {% block title %}Accueil{% endblock %}</title>
</head>
<body>
......@@ -71,7 +71,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</button>
<a class="navbar-brand" href="/">
<img src="{% static 'images/logo_re2o_navbar.svg' %}" height=32>
{{ site_name }}
{{ name_website }}
</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment