Author: russellm
Date: 2010-05-10 06:38:37 -0500 (Mon, 10 May 2010)
New Revision: 13197
Modified:
django/trunk/docs/topics/auth.txt
Log:
Fixed #13158 -- Clarified that OneToOneField is a better option for User
profile classes. Thanks to hvdklauw for the report and patch.
Modified: django/trunk/docs/topics/auth.txt
===================================================================
--- django/trunk/docs/topics/auth.txt 2010-05-10 11:37:45 UTC (rev 13196)
+++ django/trunk/docs/topics/auth.txt 2010-05-10 11:38:37 UTC (rev 13197)
@@ -71,7 +71,7 @@
Required. 30 characters or fewer. Alphanumeric characters only
(letters, digits and underscores).
-
+
.. versionchanged:: 1.2
Usernames may now contain `...@``, ``+``, ``.`` and ``-``
characters.
@@ -293,7 +293,7 @@
.. method:: models.UserManager.create_user(username, email, password=None)
Creates, saves and returns a :class:`~django.contrib.auth.models.User`.
-
+
The :attr:`~django.contrib.auth.models.User.username` and
:attr:`~django.contrib.auth.models.User.password` are set as given. The
domain portion of :attr:`~django.contrib.auth.models.User.email` is
@@ -486,12 +486,13 @@
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
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.