Code

#19901 closed Cleanup/optimization (wontfix)

introspect user model to determine REQUIRED_FIELDS

Reported by: ptone 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

Attachments (0)

Change History (5)

comment:1 Changed 17 months ago by biern

  • Owner changed from nobody to biern
  • Status changed from new to assigned

comment:2 Changed 17 months ago by gnosek

  • Cc root@… added

comment:3 Changed 17 months ago by biern

  • Owner biern deleted
  • Status changed from assigned to new

comment:4 Changed 17 months ago by biern

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 17 months ago by ptone

  • Resolution set to wontfix
  • Status changed from new to 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.