From fffade663365ee50f32a0c3b05915fba15a5fe3b Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee <russell@keith-magee.com> Date: Tue, 3 Feb 2009 23:13:02 +0000 Subject: [PATCH] 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 --- docs/topics/db/queries.txt | 1 + 1 file changed, 1 insertion(+) 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,