Commit 0765d4b5 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

[1.1.X] Fixed #13158 -- Clarified that OneToOneField is a better option for...

[1.1.X] Fixed #13158 -- Clarified that OneToOneField is a better option for User profile classes. Thanks to hvdklauw for the report and patch.

Backport of r13197 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 45c409f3
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -446,12 +446,13 @@ If you'd like to store additional information related to your users, Django
provides a method to specify a site-specific related model -- termed a "user
profile" -- for this purpose.

To make use of this feature, define a model with fields for the additional
information you'd like to store, or additional methods you'd like to have
available, and also add a :class:`~django.db.models.Field.ForeignKey` from your
model to the :class:`~django.contrib.auth.models.User` model, specified with
``unique=True`` to ensure only one instance of your model can be created for
each :class:`~django.contrib.auth.models.User`.
To make use of this feature, define a model with fields for the
additional information you'd like to store, or additional methods
you'd like to have available, and also add a
:class:`~django.db.models.Field.OneToOneField` from your model to the
:class:`~django.contrib.auth.models.User` model. This will ensure only
one instance of your model can be created for each
:class:`~django.contrib.auth.models.User`.

To indicate that this model is the user profile model for a given site, fill in
the setting :setting:`AUTH_PROFILE_MODULE` with a string consisting of the