Ticket #3807: db-api.txt.diff
File db-api.txt.diff, 1.0 KB (added by , 17 years ago) |
---|
-
db-api.txt
388 388 `Field lookups`_ below. Multiple parameters are joined via ``AND`` in the 389 389 underlying SQL statement, and the whole thing is enclosed in a ``NOT()``. 390 390 391 This example excludes all entries whose ``pub_date`` is the current date/time391 This example excludes all entries whose ``pub_date`` is later than 2005-1-3 392 392 AND whose ``headline`` is "Hello":: 393 393 394 394 Entry.objects.exclude(pub_date__gt=datetime.date(2005, 1, 3), headline='Hello') … … 398 398 SELECT ... 399 399 WHERE NOT (pub_date > '2005-1-3' AND headline = 'Hello') 400 400 401 This example excludes all entries whose ``pub_date`` is the current date/time 402 OR whose ``headline`` is "Hello":: 401 This example excludes all entries whose ``pub_date`` is later than 2005-1-3 AND whose headline is NOT "Hello":: 403 402 404 403 Entry.objects.exclude(pub_date__gt=datetime.date(2005, 1, 3)).exclude(headline='Hello') 405 404