django-jazzmin icon indicating copy to clipboard operation
django-jazzmin copied to clipboard

Django-jazzmin - Logout

Open HamaBarhamou opened this issue 1 year ago • 1 comments

hello, here's a conversation that seems to evoke a problem that can be corrected here.

HamaBarhamou avatar Dec 26 '23 20:12 HamaBarhamou

We implemented this fix on our base code without forking the Jazzmin codebase with the help of the devs in the conversation above. I can confirm there is a problem with the logout button. instead of sending POST /logout, it sends GET /logout.

idan-krayon avatar Dec 26 '23 20:12 idan-krayon

Since django-5, you need to do this through a POST request. To fix this, replace logout dropdown at jazzmin base.html with this :-

<form action="{% url 'admin:logout' %}" method="POST">
    {% csrf_token %}
    <button type="submit" class="dropdown-item">
        <i class="fas fa-users mr-2"></i> {% trans 'Log out' %}
    </button>
</form>

Django Admin Logout Fixes Django Admin Logout Fixed

Malith-Rukshan avatar Mar 01 '24 15:03 Malith-Rukshan

Duplicate issue - https://github.com/farridav/django-jazzmin/issues/522 PR raised (x2) - https://github.com/farridav/django-jazzmin/pull/523 / https://github.com/farridav/django-jazzmin/pull/537

jamesgilmorelyst avatar Mar 22 '24 12:03 jamesgilmorelyst

Hey @HamaBarhamou, a PR was merged today (https://github.com/farridav/django-jazzmin/pull/544) to fix this issue. A new release will be needed to release this fix.

jamesgilmorelyst avatar Mar 23 '24 14:03 jamesgilmorelyst

Hé@HamaBarhamou, un PR a été fusionné aujourd'hui ( #544 ) pour résoudre ce problème. Une nouvelle version sera nécessaire pour publier ce correctif.

great, so we can close this problem

HamaBarhamou avatar Mar 23 '24 20:03 HamaBarhamou

Apologies for the delay, but we've release the fix to resolve the logout issue now:

  • https://github.com/farridav/django-jazzmin/releases/tag/v3.0.0

If you are still supporting an older version of Python (<3.8) or Django (<4) then we also have release a fix for this version as well:

  • https://github.com/farridav/django-jazzmin/releases/tag/v2.6.2

PacificGilly avatar Apr 18 '24 19:04 PacificGilly

Toutes nos excuses pour le retard, mais nous avons publié le correctif pour résoudre le problème de déconnexion :

  • https://github.com/farridav/django-jazzmin/releases/tag/v3.0.0

Si vous prenez toujours en charge une ancienne version de Python (<3.8) ou de Django (<4), nous avons également publié un correctif pour cette version :

  • https://github.com/farridav/django-jazzmin/releases/tag/v2.6.2

great. glad to have helped

HamaBarhamou avatar Apr 19 '24 09:04 HamaBarhamou