From 3569536491f16c9d112959d23cf3c18417063c54 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 19 Aug 2014 07:23:17 -0400 Subject: [PATCH] Fixed #23314 -- Tempered recommendation of storing profile data on custom user. Thanks gavinwahl for the report. --- docs/topics/auth/customizing.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index 516ae064c4e..2bf4b9ba8ed 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -453,6 +453,8 @@ different User model. :setting:`AUTH_USER_MODEL` setting in code that is executed at import time. ``get_user_model()`` only works once Django has imported all models. +.. _specifying-custom-user-model: + Specifying a custom User model ------------------------------ @@ -706,10 +708,12 @@ Extending Django's default User ------------------------------- If you're entirely happy with Django's :class:`~django.contrib.auth.models.User` -model and you just want to add some additional profile information, you can +model and you just want to add some additional profile information, you could simply subclass ``django.contrib.auth.models.AbstractUser`` and add your -custom profile fields. This class provides the full implementation of the -default :class:`~django.contrib.auth.models.User` as an :ref:`abstract model +custom profile fields, although we'd recommend a separate model as described in +the "Model design considerations" note of :ref:`specifying-custom-user-model`. +``AbstractUser`` provides the full implementation of the default +:class:`~django.contrib.auth.models.User` as an :ref:`abstract model `. .. _custom-users-and-the-built-in-auth-forms: