summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/auth/default.txt32
1 files changed, 20 insertions, 12 deletions
diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt
index 10401717cf..d184b979fe 100644
--- a/docs/topics/auth/default.txt
+++ b/docs/topics/auth/default.txt
@@ -1665,6 +1665,23 @@ provides several built-in forms located in :mod:`django.contrib.auth.forms`:
Option to disable (or reenable) password-based authentication was
added.
+.. class:: AdminUserCreationForm
+
+ .. versionadded:: 5.1.1
+
+ A form used in the admin interface to create a new user. Inherits from
+ :class:`UserCreationForm`.
+
+ It includes an additional ``usable_password`` field, enabled by default. If
+ ``usable_password`` is enabled, it verifies that ``password1`` and
+ ``password2`` are non empty and match, validates the password using
+ :func:`~django.contrib.auth.password_validation.validate_password`, and
+ sets the user's password using
+ :meth:`~django.contrib.auth.models.User.set_password()`.
+ If ``usable_password`` is disabled, no password validation is done, and
+ password-based authentication is disabled for the user by calling
+ :meth:`~django.contrib.auth.models.User.set_unusable_password()`.
+
.. class:: AuthenticationForm
A form for logging a user in.
@@ -1755,21 +1772,12 @@ provides several built-in forms located in :mod:`django.contrib.auth.forms`:
A :class:`~django.forms.ModelForm` for creating a new user. This is the
recommended base class if you need to customize the user creation form.
- It has four fields: ``username`` (from the user model), ``password1``,
- ``password2``, and ``usable_password`` (the latter is enabled by default).
- If ``usable_password`` is enabled, it verifies that ``password1`` and
- ``password2`` are non empty and match, validates the password using
+ It has three fields: ``username`` (from the user model), ``password1``,
+ and ``password2``. It verifies that ``password1`` and ``password2`` match,
+ validates the password using
:func:`~django.contrib.auth.password_validation.validate_password`, and
sets the user's password using
:meth:`~django.contrib.auth.models.User.set_password()`.
- If ``usable_password`` is disabled, no password validation is done, and
- password-based authentication is disabled for the user by calling
- :meth:`~django.contrib.auth.models.User.set_unusable_password()`.
-
- .. versionchanged:: 5.1
-
- Option to create users with disabled password-based authentication was
- added.
.. class:: UserCreationForm