summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-07-04 09:32:32 -0400
committerTim Graham <timograham@gmail.com>2013-07-04 09:32:32 -0400
commitf407f75aae242d1bd8d4ac7f19c5d4075353c65e (patch)
tree05cc7ea1a46975e7de8aa21c142b44781774f811 /docs
parent428de2e3394873810645010020d65841ab72bb14 (diff)
Fixed #20673 -- Clarified that HttpRequest.user uses AUTH_USER_MODEL.
Thanks littlepig for the report.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/request-response.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index f1c5702d36..060ec02e91 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -165,10 +165,11 @@ All attributes should be considered read-only, unless stated otherwise below.
.. attribute:: HttpRequest.user
- A ``django.contrib.auth.models.User`` object representing the currently
+ An object of type :setting:`AUTH_USER_MODEL` representing the currently
logged-in user. If the user isn't currently logged in, ``user`` will be set
- to an instance of ``django.contrib.auth.models.AnonymousUser``. You
- can tell them apart with ``is_authenticated()``, like so::
+ to an instance of :class:`django.contrib.auth.models.AnonymousUser`. You
+ can tell them apart with
+ :meth:`~django.contrib.auth.models.User.is_authenticated`, like so::
if request.user.is_authenticated():
# Do something for logged-in users.
@@ -176,8 +177,8 @@ All attributes should be considered read-only, unless stated otherwise below.
# Do something for anonymous users.
``user`` is only available if your Django installation has the
- ``AuthenticationMiddleware`` activated. For more, see
- :doc:`/topics/auth/index`.
+ :class:`~django.contrib.auth.middleware.AuthenticationMiddleware`
+ activated. For more, see :doc:`/topics/auth/index`.
.. attribute:: HttpRequest.session