Opened 15 years ago
Closed 15 years ago
#13667 closed (wontfix)
Multiple profile models via AUTH_PROFILE_MODULES (proposal)
Reported by: | Alexandru Plugaru | Owned by: | nobody |
---|---|---|---|
Component: | Contrib apps | Version: | 1.2 |
Severity: | Keywords: | user auth profile multiple | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | yes | Patch needs improvement: | yes |
Easy pickings: | UI/UX: |
Description
I was developing a few apps that required some data stored to users profile. Since now there can be only one model that can be used as a profile and the way around it is somewhat ugly, I've made some changes to get_profile method. In settings instead of:
AUTH_PROFILE_MODULE = "app_label.model"
you can do this:
AUTH_PROFILE_MODULES = ("app_label1.model", "app_label2.model", )
Attachments (1)
Change History (5)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Patch needs improvement: | set |
---|
comment:3 by , 15 years ago
Needs documentation: | set |
---|---|
Needs tests: | set |
comment:4 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
My preference would be to deprecate the use of AUTH_PROFILE_MODULES, not enhance it.
The related object manager for OneToOne fields already cache the remote object, so there isn't any caching benefit to had here -- _profile_cache is a historical artefact.
On top of that, you appear to be proposing that we modify get_profile so that it might return multiple objects, depending on the value of a setting.
Marking wontfix. I can't say I'm a fan of this proposal. Feel free to start a discussion on django-dev if you want to advocate for this idea.
Your patch is not properly generated, so trac does not recognize it.
From the contributing document: