Method Not Allowed (GET): /admin/logout/ #2071
-
when I will log out via the logout button on the top right, but for the login button there is no problem.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In Django 5.0, they removed the ability to log out via a simple link (i.e. the GET method), see https://docs.djangoproject.com/en/5.0/releases/5.0/#features-removed-in-5-0 A solution is to change the logout link to a form in your template, for example:
Or, if you still want it formatted as an anchor link (assumes jQuery):
Given that Django 5.0 support in Mezzanine isn't official as yet, the templates haven't been updated - but that's certainly something we should consider adding. For now, update your own templates so the logout link uses a form like the above. EDIT: I now see that you are commenting on logging out via the Admin interface. That is probably another template that should be updated. It's not as vital as the public log out link, however. |
Beta Was this translation helpful? Give feedback.
In Django 5.0, they removed the ability to log out via a simple link (i.e. the GET method), see https://docs.djangoproject.com/en/5.0/releases/5.0/#features-removed-in-5-0
A solution is to change the logout link to a form in your template, for example:
Or, if you still want it formatted as an anchor link (assumes jQuery):
Given that Django 5.0 support in Mezzanine isn't official as yet,…