Opened 12 years ago
Closed 12 years ago
#19901 closed Cleanup/optimization (wontfix)
introspect user model to determine REQUIRED_FIELDS
Reported by: | Preston Holmes | Owned by: | |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
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 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 12 years ago
Cc: | added |
---|
comment:3 by , 12 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:4 by , 12 years ago
comment:5 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
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.