diff options
author | Paul Schilling <mail@paulschilling.de> | 2022-09-24 15:26:14 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-12-29 09:42:22 +0100 |
commit | 298d02a77a69321af8c0023df3250663e9d1362d (patch) | |
tree | 087ab161aeb1765d38d31f39ae004fc3d76f20c0 /docs/topics/auth | |
parent | 1833eb3f3e3bda5052637f1a51a27fa1b11b6871 (diff) | |
download | django-298d02a77a69321af8c0023df3250663e9d1362d.tar.gz |
Fixed #25617 -- Added case-insensitive unique username validation in UserCreationForm.
Co-Authored-By: Neven Mundar <nmundar@gmail.com>
Diffstat (limited to 'docs/topics/auth')
-rw-r--r-- | docs/topics/auth/default.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index 549430aaad..038f2b8eaf 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -1654,9 +1654,12 @@ provides several built-in forms located in :mod:`django.contrib.auth.forms`: A form used in the admin interface to change a user's information and permissions. -.. class:: UserCreationForm +.. class:: BaseUserCreationForm + + .. versionadded:: 4.2 - A :class:`~django.forms.ModelForm` for creating a new user. + 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 three fields: ``username`` (from the user model), ``password1``, and ``password2``. It verifies that ``password1`` and ``password2`` match, @@ -1665,11 +1668,19 @@ provides several built-in forms located in :mod:`django.contrib.auth.forms`: sets the user's password using :meth:`~django.contrib.auth.models.User.set_password()`. +.. class:: UserCreationForm + + Inherits from :class:`BaseUserCreationForm`. To help prevent confusion with + similar usernames, the form doesn't allow usernames that differ only in + case. + .. versionchanged:: 4.2 In older versions, :class:`UserCreationForm` didn't save many-to-many form fields for a custom user model. + In older versions, usernames that differ only in case are allowed. + .. currentmodule:: django.contrib.auth Authentication data in templates |