Opened 9 years ago

Closed 8 years ago

#15937 closed Cleanup/optimization (fixed)

Deprecate AUTH_PROFILE_MODULE and get_profile

Reported by: Mikhail Korobov Owned by: nobody
Component: contrib.auth Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Is it really necessary? I think it is confusing, especially for the newcomers.

If deprecating is too much, maybe the docs ( should be rewritten: new users should be advised to create a models with OneToOne field pointing to django.auth.models.User and to setup the signal for profile auto-creation (with copy-pastable example).

Change History (6)

comment:1 Changed 9 years ago by Aymeric Augustin

Resolution: invalid
Status: newclosed

The fact that you don't understand get_profile and AUTH_PROFILE_MODULE doesn't mean they are useless. They were introduced to provide a standardized way to extend a user's profile, after lots of discussion.

Overall, this change is quite sensitive, backwards incompatible, and it removes a feature without a very good reason. You should review the discussions and tickets that have led to their introduction, propose something better on the mailing-list, and obtain consensus, and then you could reopen this ticket.

comment:2 Changed 9 years ago by Mikhail Korobov

Documentation change is totally backwards compatible and get_profile is not a *feature* in my opinion - it does almost nothing. How is user.get_profile() better than user.profile? It is just more verbose and less explicit. It was introduced to provide a standardised way to handle user profiles while ago but I haven't seen a lot of django apps using this feature (except for some profile-editing apps - but I don't see how would they suffer from documentation change and even from deprecating the option).

There is at least one +0/+1 voice from a django core developer in recent discussions at django-developers mailing list (see ).

Anyway, the new thread:

comment:3 Changed 9 years ago by Jannis Leidel

Resolution: invalid
Status: closedreopened
Triage Stage: UnreviewedAccepted

I definitely believe the get_profile hook serves a good purpose (get the profile for a user in a single profile scenario). The use of OneToOneFields are equally powerful and only needs some sensible documentation to become a good replacement. So I'm +1 on changing the docs to have a "advanced" or "multiple profiles" section.

comment:4 Changed 9 years ago by Aymeric Augustin

kmike, thanks for the additional context.

I didn't remember that discussion from March on django-developers and your initial report was pretty vague.

The ticket makes much more sense with your new comment.

comment:5 Changed 8 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 Changed 8 years ago by Claude Paroz

Resolution: fixed
Status: reopenedclosed

get_profile and AUTH_PROFILE_MODULE have been deprecated in [70a0de37d132e5f1514fb939875f69649f103124].

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