diff options
| author | Tim Graham <timograham@gmail.com> | 2013-02-23 15:42:56 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-02-23 15:42:56 -0500 |
| commit | 24a2bcbcdd9e76901cd8f8bb38d9d5b6e0bc4fd6 (patch) | |
| tree | 5ab5cabeaba21fd72f063e5c53e17e3c14c3aeeb /docs/topics | |
| parent | 2cd0edaa477b327024e4007c8eaf46646dcd0f21 (diff) | |
Fixed #19402 - Clarified purpose of CustomUser.REQUIRED_FIELDS
Thanks pydanny for the report and ptone for the patch.
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/auth/customizing.txt | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index c5d9e4ff7b..204c11765c 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -507,9 +507,16 @@ 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. For example, here is the partial definition for a User model - that defines two required fields - a date of birth and height:: + 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. + + For example, here is the partial definition for a ``User`` model that + defines two required fields - a date of birth and height:: class MyUser(AbstractBaseUser): ... |
