Browse files

Fixed #10187 -- Added documentation on how to import F() objects. Tha…

…nks to trigeek38 for the report.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent e3d64c6 commit fffade663365ee50f32a0c3b05915fba15a5fe3b @freakboy3742 freakboy3742 committed Feb 3, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 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,

0 comments on commit fffade6

Please sign in to comment.