summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2016-06-15 18:09:59 +0500
committerTim Graham <timograham@gmail.com>2016-06-15 10:35:39 -0400
commit99e51bf168a628f67749fcfbd31951c499c403fc (patch)
tree49c6b9a1d90e9a0398a60313a2e5e28bbbddd4c0 /docs
parentab7a0b5d17fc8d0410b86d42835be9b767636e06 (diff)
[1.9.x] Refs #14030 -- Updated docs per "Improved expression support for python values."
Complements e2d6e14662d780383e18066a3182155fb5b7747b. Backport of db613f4f1250971942f766dcf97c22234a3aa14e from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/conditional-expressions.txt5
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/ref/models/conditional-expressions.txt b/docs/ref/models/conditional-expressions.txt
index a4daea94b3..52a9d8cdc6 100644
--- a/docs/ref/models/conditional-expressions.txt
+++ b/docs/ref/models/conditional-expressions.txt
@@ -72,7 +72,6 @@ Keep in mind that each of these values can be an expression.
:class:`~django.db.models.Model` has a field named ``then``. This can be
resolved in two ways::
- >>> from django.db.models import Value
>>> When(then__exact=0, then=1)
>>> When(Q(then=0), then=1)
@@ -118,8 +117,8 @@ A simple example::
``Case()`` accepts any number of ``When()`` objects as individual arguments.
Other options are provided using keyword arguments. If none of the conditions
evaluate to ``TRUE``, then the expression given with the ``default`` keyword
-argument is returned. If no ``default`` argument is provided, ``Value(None)``
-is used.
+argument is returned. If a ``default`` argument isn't provided, ``None`` is
+used.
If we wanted to change our previous query to get the discount based on how long
the ``Client`` has been with us, we could do so using lookups::