Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 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:

Description

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.

Attachments (0)

Change History (2)

comment:1 Changed 4 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 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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.