Opened 3 years ago

Closed 3 years ago

#19411 closed Cleanup/optimization (invalid)

Fully featured User model with admin-compliant permissions without username

Reported by: michal@… Owned by: nobody
Component: contrib.auth Version: 1.5-beta-1
Severity: Normal Keywords: AbstractUser
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I wanted to create a simple user Model with admin-compliant permissions so I used AbstractUser then I created my UserManager for that.

I don't need a username field in my User model. Why the AbstractUser class have username, first_name and last_name fields?
Are they required to admin-compliant permissions functionality?

Would be a better idea to move that fields in to User class?

Change History (1)

comment:1 Changed 3 years ago by ptone

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

There are a number of layers of abstraction, the basic requirements are laid out here:

If you choose to extend AbstractUser you take on even more default configuration of your user model

If you can point to a specific unclear point in the docs - please reopen.

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