logout now needs to be a post request

This commit is contained in:
Ross
2024-02-21 23:07:18 +00:00
parent 081f8cbcee
commit 9435463707
2 changed files with 22 additions and 4 deletions
+8 -4
View File
@@ -51,9 +51,9 @@
<script src="{% static 'autocomplete_light/select2.min.js' %}"></script>
<script src="{% static 'autocomplete_light/i18n/en.js' %}"></script>
{% comment %} mathjax {% endcomment %}
<script src="{% static 'js/tex-mml-chtml.js' %}"></script>
<script src="{% static 'js/dexie.js' %}"></script>
<script src="{% static 'js/html5sortable.min.js' %}"></script>
<script src="{% static 'js/tex-mml-chtml.js' %}"></script>
<script src="{% static 'js/dexie.js' %}"></script>
<script src="{% static 'js/html5sortable.min.js' %}"></script>
<script src="{% static 'tesseract.min.js' %}"></script>
<script src="{% static 'js/toastr.min.js' %}"></script>
<script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
@@ -80,7 +80,11 @@
<div class="main-nav-header">
{% if request.user.is_authenticated %}
<span id="logout-link" class="top-bar-link">
<a href="{% url 'logout' %}">Logout</a>
<form id="logout-form" method="post" action="{% url 'logout' %}">
{% csrf_token %}
<button type="submit">Log out</button>
</form>
{% comment %} <a href="{% url 'logout' %}">Logout</a> {% endcomment %}
</span>
<span id="profile-link" class=" top-bar-link">
<a href="{% url 'profile' %}">Profile</a>