Opened 16 months ago

Closed 15 months ago

Last modified 15 months ago

#21726 closed Bug (fixed)

Documentation for REQUIRED_FIELDS on custom users is ambiguous

Reported by: russellm 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 timo 15 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 16 months ago by russellm

  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 16 months ago by russellm

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

Changed 15 months ago by timo

comment:3 Changed 15 months ago by timo

  • Has patch set
  • Needs documentation unset

Does the patch look ok?

comment:4 Changed 15 months ago by Tim Graham <timograham@…>

  • Owner set to Tim Graham <timograham@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 6f06c749b73abea84cd61a7bcfd1cc9732fbefe5:

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

Thanks russellm for the report.

comment:5 Changed 15 months 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 15 months 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