Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #12084 -- Documented the fact that QuerySet.update() returns th…

…e number of affected rows. Thanks, timo

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 457df03c997a85da36230c96edf7283ae554879f 1 parent 5ceed0a
Adrian Holovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/topics/db/queries.txt
4 docs/topics/db/queries.txt
View
@@ -785,8 +785,8 @@ instance you want to point to. Example::
# Change every Entry so that it belongs to this Blog.
>>> Entry.objects.all().update(blog=b)
-The ``update()`` method is applied instantly and doesn't return anything
-(similar to ``delete()``). The only restriction on the ``QuerySet`` that is
+The ``update()`` method is applied instantly and returns the number of rows
+affected by the query. The only restriction on the ``QuerySet`` that is
updated is that it can only access one database table, the model's main
table. So don't try to filter based on related fields or anything like that;
it won't work.
Please sign in to comment.
Something went wrong with that request. Please try again.