Skip to content

Commit f335a98

Browse files
ldidryfallen
authored andcommitted
🩹 — Fix logout (Django needs POST)
1 parent feb56d8 commit f335a98

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎pytition/petition/templates/layouts/nav-useractions.html‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@
3737
<span class="oi oi-cog"></span>
3838
{% trans "Settings" %}
3939
</a>
40-
<a class="dropdown-item" href="{% url "logout" %}?next=/">
41-
<span class="oi oi-account-logout"></span>
42-
{% trans "Logout" %}
43-
</a>
40+
<form action="{% url "logout" %}?next=/" method="post">
41+
{% csrf_token %}
42+
<button class="dropdown-item" type="submit">
43+
<span class="oi oi-account-logout"></span>
44+
{% trans "Logout" %}
45+
</button>
46+
</form>
4447
</div>
4548
{% endblock navdropdown %}
4649
</li>

0 commit comments

Comments
 (0)