﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36575	Document using a link for LogoutView	Alex Dehnert	Abhimanyu Singh Negi	"The Django 4.1 release notes mention:

    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>
    }}}

However, the `admin:logout` view appears to require the the user have admin access (at least, empirically, my user that doesn't gets redirected to `/admin/` and then `/admin/login/`). The plain `logout` URL name (https://docs.djangoproject.com/en/5.2/topics/auth/default/#django.contrib.auth.views.LogoutView), which doesn't require this, seems like a better fit.

(Relatedly, this information seems pretty timeless -- should it be included in say the docs for LogoutView, rather than just some increasingly-old release notes? Presumably somebody writing a brand-new Django 5.2 app *also* wants to know how to make a logout link. I spent a bit looking around the docs and don't see it mentioned anywhere -- actually, I was a little surprised that the tutorial doesn't obviously mention extending base templates and provide a sample template with a login link, logout link, etc..)"	Cleanup/optimization	assigned	Documentation	4.1	Normal			Alex Dehnert	Accepted	1	0	0	1	0	0
