Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…nks to trigeek38 for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit fffade663365ee50f32a0c3b05915fba15a5fe3b 1 parent e3d64c6
@freakboy3742 freakboy3742 authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  docs/topics/db/queries.txt
View
1  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,
Please sign in to comment.
Something went wrong with that request. Please try again.