mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Refs #17209 -- Added LoginView and LogoutView class-based views
Thanks Tim Graham for the review.
This commit is contained in:
parent
742ea51413
commit
78963495d0
16 changed files with 226 additions and 157 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -436,8 +436,8 @@ Here's how Django uses the sites framework:
|
|||
the current :class:`~django.contrib.sites.models.Site` object if you don't
|
||||
specify a fully-qualified domain.
|
||||
|
||||
* In the :mod:`authentication framework <django.contrib.auth>`, the
|
||||
:func:`django.contrib.auth.views.login` view passes the current
|
||||
* In the :mod:`authentication framework <django.contrib.auth>`,
|
||||
:class:`django.contrib.auth.views.LoginView` passes the current
|
||||
:class:`~django.contrib.sites.models.Site` name to the template as
|
||||
``{{ site_name }}``.
|
||||
|
||||
|
|
|
@ -2736,8 +2736,8 @@ the URL in two places (``settings`` and URLconf).
|
|||
|
||||
Default: ``None``
|
||||
|
||||
The URL where requests are redirected after a user logs out using the
|
||||
:func:`~django.contrib.auth.views.logout` view (if the view doesn't get a
|
||||
The URL where requests are redirected after a user logs out using
|
||||
:class:`~django.contrib.auth.views.LogoutView` (if the view doesn't get a
|
||||
``next_page`` argument).
|
||||
|
||||
If ``None``, no redirect will be performed and the logout view will be
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue