Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#12681 closed (duplicate)

Make User model site business logic agnostic

Reported by: zuck Owned by: nobody
Component: contrib.auth Version: 1.1
Severity: Keywords: user auth profile login registration
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


In my opinion the default User model (contrib.auth) isn't generic enough to work with all generic web applications.

My idea is to remove filename, lastname and email fields from the User model and add a default Profile model which includes them.

In this way the User model implements only the auth logic (username, password, ...) while the specific site business logic for accounts could be implemented in a custom Profile model.

A practical example:

I want to develop a CRM: I've a partner class with zero or more contacts. Some of these contacts may have an account to the CRM. Now imagine each contact has firstname, lastname and email fields, we have a obvious collision between contact and user fields.

Change History (2)

comment:1 Changed 7 years ago by russellm

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

Duplicate of #3011

comment:2 Changed 5 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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