summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDamien Baty <damien@damienbaty.com>2014-09-17 19:56:56 +0200
committerTim Graham <timograham@gmail.com>2014-09-18 10:48:28 -0400
commitad491ecc6e20569a4f5c30a671a935f5c766a295 (patch)
tree604af3714a156b98f0aa4230c52445ce3f448955 /docs
parent8facb02faf1880187888b26724760865547b05b0 (diff)
Fixed #23488 -- Added AnonymousUser.get_username().
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/auth.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
index 3c96fc835a..1d09359e50 100644
--- a/docs/ref/contrib/auth.txt
+++ b/docs/ref/contrib/auth.txt
@@ -269,6 +269,10 @@ Anonymous users
these differences:
* :ref:`id <automatic-primary-key-fields>` is always ``None``.
+ * :attr:`~django.contrib.auth.models.User.username` is always the empty
+ string.
+ * :meth:`~django.contrib.auth.models.User.get_username()` always returns
+ the empty string.
* :attr:`~django.contrib.auth.models.User.is_staff` and
:attr:`~django.contrib.auth.models.User.is_superuser` are always
``False``.
@@ -285,6 +289,11 @@ Anonymous users
:meth:`~django.db.models.Model.save` and
:meth:`~django.db.models.Model.delete()` raise :exc:`NotImplementedError`.
+ .. versionadded:: 1.8
+
+ ``AnonymousUser.get_username()`` has been added to
+ better mirror :class:`django.contrib.auth.models.User`.
+
In practice, you probably won't need to use
:class:`~django.contrib.auth.models.AnonymousUser` objects on your own, but
they're used by Web requests, as explained in the next section.