Opened 13 years ago

Closed 12 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

Description

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

If deprecating is too much, maybe the docs (http://docs.djangoproject.com/en/1.3/topics/auth/#storing-additional-information-about-users) 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 by Aymeric Augustin, 13 years ago

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 by Mikhail Korobov, 13 years ago

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 https://groups.google.com/d/msg/django-developers/1Xj8Zzdokrw/d3TaHQMBHmcJ ).

Anyway, the new thread: https://groups.google.com/d/topic/django-developers/Xd7_PhJhRUg/discussion.

comment:3 by Jannis Leidel, 13 years ago

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 by Aymeric Augustin, 13 years ago

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 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 by Claude Paroz, 12 years ago

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