Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

s/get/filter in new example of how to use queryset update method: upd…

…ate won't work on a model instance.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 901ea8a68d4aa064f2e72eeac5ca87968905673e 1 parent 471a841
@kmtracey kmtracey authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/ref/models/querysets.txt
2  docs/ref/models/querysets.txt
@@ -1326,7 +1326,7 @@ memory. The former is more efficient. For example, instead of doing this:: this::
- Entry.objects.get(id=10).update(comments_on=False)
+ Entry.objects.filter(id=10).update(comments_on=False)
Using ``update()`` instead of loading the object into memory also prevents a
race condition where something might change in your database in the short

0 comments on commit 901ea8a

Please sign in to comment.
Something went wrong with that request. Please try again.