Refs #17209 -- Added LoginView and LogoutView class-based views

Thanks Tim Graham for the review.
This commit is contained in:
Claude Paroz 2016-05-15 17:28:00 +02:00
parent 742ea51413
commit 78963495d0
16 changed files with 226 additions and 157 deletions

View file

@ -93,7 +93,7 @@ Fields
if you want to allow inactive users to login. In this case, you'll also
want to customize the
:class:`~django.contrib.auth.forms.AuthenticationForm` used by the
:func:`~django.contrib.auth.views.login` view as it rejects inactive
:class:`~django.contrib.auth.views.LoginView` as it rejects inactive
users. Be aware that the permission-checking methods such as
:meth:`~django.contrib.auth.models.User.has_perm` and the
authentication in the Django admin all return ``False`` for inactive
@ -582,7 +582,7 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
When using this backend, you'll likely want to customize the
:class:`~django.contrib.auth.forms.AuthenticationForm` used by the
:func:`~django.contrib.auth.views.login` view by overriding the
:class:`~django.contrib.auth.views.LoginView` by overriding the
:meth:`~django.contrib.auth.forms.AuthenticationForm.confirm_login_allowed`
method as it rejects inactive users.