summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-08-02 09:32:00 -0400
committerTim Graham <timograham@gmail.com>2016-08-02 11:01:08 -0400
commit54afa960d1ee8c63635225a0f0a2489971b5aab5 (patch)
tree89cdc33c2ffd2bb7ce034004fc8bb2d9a3a67c51 /docs
parentd95c669c29a0403cd1098664f0ef863fae8b7c98 (diff)
Fixed #26988 -- Improved/clarified User.is_authenticated/anonymous compatibility.
Thanks marktranchant for the report and review.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/1.10.1.txt3
-rw-r--r--docs/releases/1.10.txt8
2 files changed, 11 insertions, 0 deletions
diff --git a/docs/releases/1.10.1.txt b/docs/releases/1.10.1.txt
index 2f4fd581b9..86cd087bdf 100644
--- a/docs/releases/1.10.1.txt
+++ b/docs/releases/1.10.1.txt
@@ -11,3 +11,6 @@ Bugfixes
* Fixed a crash in MySQL connections where ``SELECT @@SQL_AUTO_IS_NULL``
doesn't return a result (:ticket:`26991`).
+
+* Allowed ``User.is_authenticated`` and ``User.is_anonymous`` properties to be
+ compared using ``==`` and ``!=`` (:ticket:`26988`).
diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt
index 1f6ebc3a7e..88209cb1cf 100644
--- a/docs/releases/1.10.txt
+++ b/docs/releases/1.10.txt
@@ -1061,6 +1061,14 @@ method, e.g.::
If you override these methods in a custom user model, you must change them to
properties or attributes.
+Django uses a ``CallableBool`` object to allow these attributes to work as both
+a property and a method. Thus, until the deprecation period ends, you cannot
+compare these properties using the ``is`` operator. That is, the following
+won't work::
+
+ if request.user.is_authenticated is True:
+ ...
+
Custom manager classes available through ``prefetch_related`` must define a ``_apply_rel_filters()`` method
-----------------------------------------------------------------------------------------------------------