Skip to content
Snippets Groups Projects
Commit 3f3b7525 authored by Andreas Nüßlein's avatar Andreas Nüßlein
Browse files

more small fixes

parent b67e6aa0
No related branches found
No related tags found
No related merge requests found
......@@ -302,4 +302,4 @@ LOGGING = {
}
# Feature toggles
FEATURE_SHOW_TRANSLATIONS = env.bool("FEATURE_SHOW_TRANSLATIONS", default=True)
FEATURE_SHOW_TRANSLATIONS = env.bool("FEATURE_SHOW_TRANSLATIONS", default=False)
......@@ -43,8 +43,6 @@ sentry_sdk.init(
# INSTALLED_APPS += ("djangosecure",)
TEMPLATES[0]["APP_DIRS"] = False
# LOGGING = {
# "version": 1,
# "disable_existing_loggers": True,
......
......@@ -175,7 +175,6 @@ class Header(InclusionTag):
"links1": nodes,
"links2": nodes,
},
"csrf_token": get_token(context.get("request")),
# Add template settings to be accessible in header
**template_settings(context.get("request")),
}
......
......@@ -14,7 +14,7 @@
</li>
{% elif link.languageswitcher %}
{% if FEATURE_SHOW_TRANSLATIONS %}
{% include "widgets/language_chooser.html" with onlyxs=link.onlyxs csrf_token=csrf_token %}
{% include "widgets/language_chooser.html" with onlyxs=link.onlyxs %}
{% endif %}
{% else %}
<li class="{% if link.active %}active{% endif %}{% if link.onlyxs %} hidden-md hidden-lg{% endif %}">
......
{% comment %}
context variables:
- onlyxs (bool)
- csrf_token (str)
{% endcomment %}
{% load i18n %}
......@@ -17,7 +16,6 @@
</li>
{% endfor %}
<form action="{% url 'set_language' %}" method="post">
<input name="csrfmiddlewaretoken" type="hidden" value="{{ csrf_token }}">
<input name="next" type="hidden" value="{{ redirect_to }}" />
<input name="language" type="hidden">
</form>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment