refactor: logout via GET is deprecated, use POST

This commit is contained in:
Jennifer Richards 2023-05-19 11:42:43 -03:00
parent b06fc7acc4
commit 2d6681d78c
No known key found for this signature in database
GPG key ID: 9B2BF5C5ADDA6A6E

View file

@ -32,11 +32,13 @@
{% else %}
{% if user.is_authenticated %}
<li>
<a class="dropdown-item {% if flavor != 'top' %} text-wrap link-primary{% endif %}"
rel="nofollow"
href="{% url 'django.contrib.auth.views.logout' %}">
Sign out
</a>
<form id="logout-form" method="post" action="{% url 'django.contrib.auth.views.logout' %}">
{% csrf_token %}
<button class="dropdown-item {% if flavor != 'top' %} text-wrap link-primary{% endif %}"
type="submit">
Sign out
</button>
</form>
</li>
<li>
<a class="dropdown-item {% if flavor != 'top' %} text-wrap link-primary{% endif %}"