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...
1 parent 471a841 commit 901ea8a68d4aa064f2e72eeac5ca87968905673e @kmtracey kmtracey committed Jul 6, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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.