Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21726 closed Bug (fixed)

Documentation for REQUIRED_FIELDS on custom users is ambiguous

Reported by: Russell Keith-Magee Owned by: Tim Graham <timograham@…>
Component: Documentation Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The documentation for the REQUIRED_FIELDS definition on a custom user model describes what fields must be included in required fields. It includes a note that says that USERNAME_FIELD should not be included in REQUIRED_FIELDS.

However, it doesn't say anything about password - which is a required field, and would otherwise meet the requirements of the REQUIRED_FIELDS definition. The note should be expanded (and the general definition clarified) to specifically exclude password.

This doesn't actually cause any problems -- it just means that the createsuperuser command asks for the password three times, instead of two, but it is confusing behaviour.

Attachments (1)

21726.diff (711 bytes) - added by Tim Graham 3 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 3 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

comment:2 Changed 3 years ago by Russell Keith-Magee

FYI - this was reported by 项楠 on the users mailing list.

Changed 3 years ago by Tim Graham

Attachment: 21726.diff added

comment:3 Changed 3 years ago by Tim Graham

Has patch: set
Needs documentation: unset

Does the patch look ok?

comment:4 Changed 3 years ago by Tim Graham <timograham@…>

Owner: set to Tim Graham <timograham@…>
Resolution: fixed
Status: newclosed

In 6f06c749b73abea84cd61a7bcfd1cc9732fbefe5:

Fixed #21726 -- Clarified that password should not be included in REQUIRED_FIELDS.

Thanks russellm for the report.

comment:5 Changed 3 years ago by Tim Graham <timograham@…>

In f7c2852f30fd5fe6980d6983725a41e64c6d2c53:

[1.6.x] Fixed #21726 -- Clarified that password should not be included in REQUIRED_FIELDS.

Thanks russellm for the report.

Backport of 6f06c749b7 from master

comment:6 Changed 3 years ago by Tim Graham <timograham@…>

In ebed0149505c9689650442ddc4e9a3efbf3579be:

[1.5.x] Fixed #21726 -- Clarified that password should not be included in REQUIRED_FIELDS.

Thanks russellm for the report.

Backport of 6f06c749b7 from master

Note: See TracTickets for help on using tickets.
Back to Top