Code

Ticket #13099: ticket_13099_update_example.diff

File ticket_13099_update_example.diff, 929 bytes (added by istruble, 4 years ago)
Line 
1Index: docs/ref/models/querysets.txt
2===================================================================
3--- docs/ref/models/querysets.txt       (revision 12773)
4+++ docs/ref/models/querysets.txt       (working copy)
5@@ -168,7 +168,8 @@
6 This example excludes all entries whose ``pub_date`` is later than 2005-1-3
7 OR whose headline is "Hello"::
8 
9-    Entry.objects.exclude(pub_date__gt=datetime.date(2005, 1, 3)).exclude(headline='Hello')
10+    Entry.objects.exclude(pub_date__gt=datetime.date(2005, 1, 3)) |
11+           Entry.objects.exclude(headline='Hello')
12 
13 In SQL terms, that evaluates to::
14 
15@@ -176,8 +177,10 @@
16     WHERE NOT pub_date > '2005-1-3'
17     OR NOT headline = 'Hello'
18 
19-Note the second example is more restrictive.
20+Note the second example is more restrictive.  See :ref:`complex queries <complex-lookups-with-q>` for more example lookups with OR.
21 
22+
23+
24 ``annotate(*args, **kwargs)``
25 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26