Opened 4 years ago

Closed 3 years ago

#15937 closed Cleanup/optimization (fixed)

Deprecate AUTH_PROFILE_MODULE and get_profile

Reported by: kmike 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 4 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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 4 years ago by kmike

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 4 years ago by jezdez

  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Triage Stage changed from Unreviewed to Accepted

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 4 years ago by aaugustin

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 4 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:6 Changed 3 years ago by claudep

  • Resolution set to fixed
  • Status changed from reopened to closed

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

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