Opened 4 years ago

Closed 4 years ago

#19901 closed Cleanup/optimization (wontfix)

introspect user model to determine REQUIRED_FIELDS

Reported by: Preston Holmes Owned by:
Component: contrib.auth Version: master
Severity: Normal Keywords:
Cc: root@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It should be possible to deduce what fields are required when prompting for user creation during interactive user creation. This would allow the REQUIRED_FIELDS attribute of custom users to go away.

see comments on #19402

Change History (5)

comment:1 Changed 4 years ago by Marcin Biernat

Owner: changed from nobody to Marcin Biernat
Status: newassigned

comment:2 Changed 4 years ago by Grzegorz Nosek

Cc: root@… added

comment:3 Changed 4 years ago by Marcin Biernat

Owner: Marcin Biernat deleted
Status: assignednew

comment:4 Changed 4 years ago by Marcin Biernat

This would require writing new metaclass for AbstractBaseUser which would not work in master currently (see #19688). Also, I think that this might be misleading and would have a limited usability, since ie, it would include fields that are required, but automatically set in save method.

comment:5 Changed 4 years ago by Preston Holmes

Resolution: wontfix
Status: newclosed

While I'm not sure the metaclass needs to be involved, you are right that required fields which are set in custom save methods are near impossible to differentiate from those that need to be prompted for - so I'm closing this for now until some bolt of brilliance might hit someone - thanks for looking at it.

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