Commit ceb2c86d authored by moamoak's avatar moamoak
Browse files

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

parent 55c1da24
Pipeline #724 passed with stage
in 2 minutes and 50 seconds
...@@ -42,6 +42,8 @@ def context_user(request): ...@@ -42,6 +42,8 @@ def context_user(request):
return { return {
'request_user': user, 'request_user': user,
'interfaces': interfaces, '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'), 'ipv6_enabled': OptionalMachine.get_cached_value('ipv6'),
} }
...@@ -44,8 +44,8 @@ msgstr "Accueil" ...@@ -44,8 +44,8 @@ msgstr "Accueil"
#: templates/re2o/index.html:33 #: templates/re2o/index.html:33
#, python-format #, python-format
msgid "Welcome to %(site_name)s !" msgid "Welcome to %(name_website)s !"
msgstr "Bienvenue sur %(site_name)s !" msgstr "Bienvenue sur %(name_website)s !"
#: templates/re2o/index.html:47 #: templates/re2o/index.html:47
msgid "Go there" msgid "Go there"
......
...@@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block title %}{% trans "Home" %}{% endblock %} {% block title %}{% trans "Home" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% blocktrans %}Welcome to {{ site_name }} !{% endblocktrans %}</h1> <h1>{% blocktrans %}Welcome to {{ name_website }} !{% endblocktrans %}</h1>
<div class="row"> <div class="row">
{% for service_list in services_urls %} {% for service_list in services_urls %}
......
...@@ -56,7 +56,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -56,7 +56,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<link rel="stylesheet" href="{% static 'css/base.css' %}"> <link rel="stylesheet" href="{% static 'css/base.css' %}">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/svg" href="{% static 'images/logo_re2o.svg' %}"> <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> </head>
<body> <body>
...@@ -71,7 +71,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -71,7 +71,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</button> </button>
<a class="navbar-brand" href="/"> <a class="navbar-brand" href="/">
<img src="{% static 'images/logo_re2o_navbar.svg' %}" height=32> <img src="{% static 'images/logo_re2o_navbar.svg' %}" height=32>
{{ site_name }} {{ name_website }}
</a> </a>
</div> </div>
<div class="collapse navbar-collapse" id="myNavbar"> <div class="collapse navbar-collapse" id="myNavbar">
......
Supports Markdown
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