From da44a8bdc2524424bfd3e904e394457028265619 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 6 Sep 2013 16:01:29 -0400 Subject: [PATCH] [1.6.x] Fixed #20646 -- Clarified the use of AbstractBaseUser.REQUIRED_FIELDS Thanks craigbruce. Backport of db3de52807 from master --- docs/topics/auth/customizing.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index 26e9a961479..1fe8527db06 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -508,13 +508,15 @@ password resets. You must then provide some key implementation details: .. attribute:: REQUIRED_FIELDS - A list of the field names that *must* be provided when creating a user - via the :djadmin:`createsuperuser` management command. The user will be - prompted to supply a value for each of these fields. It should include - any field for which :attr:`~django.db.models.Field.blank` is ``False`` - or undefined, but may include additional fields you want prompted for - when a user is created interactively. However, it will not work for - :class:`~django.db.models.ForeignKey` fields. + A list of the field names that will be prompted for when creating a + user via the :djadmin:`createsuperuser` management command. The user + will be prompted to supply a value for each of these fields. It must + include any field for which :attr:`~django.db.models.Field.blank` is + ``False`` or undefined and may include additional fields you want + prompted for when a user is created interactively. However, it will not + work for :class:`~django.db.models.ForeignKey` fields. + ``REQUIRED_FIELDS`` has no effect in other parts of Django, like + creating a user in the admin. For example, here is the partial definition for a ``User`` model that defines two required fields - a date of birth and height::