Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ch.4 logout page generates http 405 error #62

Open
Marforio opened this issue Mar 20, 2024 · 2 comments
Open

Ch.4 logout page generates http 405 error #62

Marforio opened this issue Mar 20, 2024 · 2 comments

Comments

@Marforio
Copy link

Marforio commented Mar 20, 2024

In templates/base.html, the use of an <a> hypertext element when calling authviews.LogoutView is causing an http 405 error because a GET request to LogoutView is being sent. LogoutView expects POST.

Why did you guys use the hypertext link to activate LogoutView?

@talhaanwarch
Copy link

talhaanwarch commented Apr 6, 2024

Look like thats true, i also could not figure it out that they had created a logged_out.html page and in code i also could not figure out the piece of code that tells to redirect to this page when user click on logout button

Btw in django 4, it work.
In django 5

Support for logging out via GET requests in the django.contrib.auth.views.LogoutView and django.contrib.auth.views.logout_then_login() is removed.`
``

@Marforio
Copy link
Author

Marforio commented Apr 7, 2024

very interesting and helpful, thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants