Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#12681 closed (duplicate)

Make User model site business logic agnostic

Reported by: Emanuele Bertoldi 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: no UI/UX: no


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 9 years ago by Russell Keith-Magee

Resolution: duplicate
Status: newclosed

Duplicate of #3011

comment:2 Changed 7 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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