Skip to content

Commit

Permalink
Merge pull request #107 from amadev/master
Browse files Browse the repository at this point in the history
Django 5x logout
  • Loading branch information
assem-ch authored Aug 27, 2024
2 parents e5cd2d9 + 7c90f80 commit 75b386c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jet/templates/admin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
<body class="{% if request.COOKIES.sidebar_pinned != 'false' %}menu-pinned {% endif %}{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"
data-admin-utc-offset="{% now "Z" %}">

<form id="logout-form" method="post" action="{% url 'admin:logout' %}">
{% csrf_token %}
</form>

<!-- Container -->
<div id="container">

Expand Down Expand Up @@ -79,7 +83,7 @@
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
{% endif %}
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
<a href="#" onclick="document.getElementById('logout-form').submit();">{% trans 'Log out' %}</a>
{% endblock %}
</div>
{% endif %}
Expand Down

0 comments on commit 75b386c

Please sign in to comment.