1
0
mirror of https://github.com/django/django.git synced 2025-03-06 15:32:33 +00:00

[5.2.x] Clarified docs for default email value in UserManager.create_user().

Backport of 5da3ad7bf90fba7321f4c2834db44aa920c70bc7 from main.
This commit is contained in:
amirreza sohrabi far 2025-02-04 23:05:07 +03:30 committed by Natalia
parent d6a44efa49
commit 2cbf32ed36

View File

@ -322,6 +322,9 @@ Manager methods
:meth:`~django.contrib.auth.models.User.set_unusable_password()` will :meth:`~django.contrib.auth.models.User.set_unusable_password()` will
be called. be called.
If no email is provided, :attr:`~django.contrib.auth.models.User.email`
will be set to an empty string.
The ``extra_fields`` keyword arguments are passed through to the The ``extra_fields`` keyword arguments are passed through to the
:class:`~django.contrib.auth.models.User`s ``__init__`` method to :class:`~django.contrib.auth.models.User`s ``__init__`` method to
allow setting arbitrary fields on a :ref:`custom user model allow setting arbitrary fields on a :ref:`custom user model