We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Even if we dont use django's logout views, we should change to logout via POST (no problem with CSRF)
from https://docs.djangoproject.com/en/4.2/releases/4.1/#log-out-via-get:
Logging out via GET requests to the built-in logout view is deprecated. Use POST requests instead. If you want to retain the user experience of an HTML link, you can use a form that is styled to appear as a link: <form id="logout-form" method="post" action="{% url 'admin:logout' %}"> {% csrf_token %} <button type="submit">{% translate "Log out" %}</button> </form> #logout-form { display: inline; } #logout-form button { background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline; }
Logging out via GET requests to the built-in logout view is deprecated. Use POST requests instead.
If you want to retain the user experience of an HTML link, you can use a form that is styled to appear as a link:
<form id="logout-form" method="post" action="{% url 'admin:logout' %}"> {% csrf_token %} <button type="submit">{% translate "Log out" %}</button> </form> #logout-form { display: inline; } #logout-form button { background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Even if we dont use django's logout views, we should change to logout via POST (no problem with CSRF)
from https://docs.djangoproject.com/en/4.2/releases/4.1/#log-out-via-get:
The text was updated successfully, but these errors were encountered: