summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-02-03 23:13:02 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-02-03 23:13:02 +0000
commitfffade663365ee50f32a0c3b05915fba15a5fe3b (patch)
treead59f20a39503e0059f08c30290d59c992e3ff20 /docs
parente3d64c6fca04dc8df1b6fdb8809d4d15d7f27740 (diff)
Fixed #10187 -- Added documentation on how to import F() objects. Thanks to trigeek38 for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/db/queries.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt
index 9a328d7023..c54039efa0 100644
--- a/docs/topics/db/queries.txt
+++ b/docs/topics/db/queries.txt
@@ -508,6 +508,7 @@ For example, to find a list of all blog entries that have had more comments
than pingbacks, we construct an ``F()`` object to reference the comment count,
and use that ``F()`` object in the query::
+ >>> from django.db.models import F
>>> Entry.objects.filter(n_pingbacks__lt=F('n_comments'))
Django supports the use of addition, subtraction, multiplication,