8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-23 11:53:12 +00:00

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

This commit is contained in:
Maël Kervella 2018-06-22 19:06:06 +00:00
parent 55c1da241a
commit ceb2c86d74
5 changed files with 8 additions and 6 deletions

View file

@ -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'),
}

Binary file not shown.

View file

@ -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"

View file

@ -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 %}

View file

@ -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">