farridav / django-jazzmin

Jazzy theme for Django
https://django-jazzmin.readthedocs.io
MIT License
1.54k stars 272 forks source link

Method Not Allowed (GET): /admin/logout/ #536

Closed 8bitaby closed 2 months ago

8bitaby commented 4 months ago

While logging out the admin, rather than performing a POST the template performs a GET operation which raises an error saying:

Method Not Allowed (GET): /admin/logout/ Method Not Allowed: /admin/logout/ GET /admin/logout/ HTTP/1.1" 405 0

sa11erto5n commented 3 months ago

the view:

def logout_user(request):
    logout(request)
    return redirect('admin:index')

the modified line of base.html: <a href="{% url 'jazzmin_dev:logout' %}" class="dropdown-item">

jamesgilmorelyst commented 3 months ago

Hi @8bitaby, 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.

jumaantony commented 3 months ago

@jamesgilmorelyst When will this be sorted? I have just installed the new version but still it aint wworking as working expected. Throwing the same error

ExcelentProgrammer commented 3 months ago

+

sriraj66 commented 2 months ago

i am also getting the same error

Method Not Allowed: /admin/logout/ 2024-04-18 20:39:06,142 - 61980 - log.py-log:241 - WARNING: Method Not Allowed: /admin/logout/ [18/Apr/2024 20:39:06] "GET /admin/logout/ HTTP/1.1" 405 0

PacificGilly commented 2 months ago

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

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: