summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/db/queries.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt
index 1180022d6e..7b38dbaea3 100644
--- a/docs/topics/db/queries.txt
+++ b/docs/topics/db/queries.txt
@@ -610,12 +610,16 @@ and use that ``F()`` object in the query::
>>> Entry.objects.filter(n_comments__gt=F('n_pingbacks'))
Django supports the use of addition, subtraction, multiplication,
-division and modulo arithmetic with ``F()`` objects, both with constants
+division, modulo, and power arithmetic with ``F()`` objects, both with constants
and with other ``F()`` objects. To find all the blog entries with more than
*twice* as many comments as pingbacks, we modify the query::
>>> Entry.objects.filter(n_comments__gt=F('n_pingbacks') * 2)
+.. versionadded:: 1.7
+
+ The power operator ``**`` was added.
+
To find all the entries where the rating of the entry is less than the
sum of the pingback count and comment count, we would issue the
query::