Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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: http://code.djangoproject.com/svn/django/trunk@16518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 901ea8a68d4aa064f2e72eeac5ca87968905673e 1 parent 471a841
Karen Tracey kmtracey authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/ref/models/querysets.txt
2  docs/ref/models/querysets.txt
View
@@ -1326,7 +1326,7 @@ memory. The former is more efficient. For example, instead of doing this::
...do 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
Please sign in to comment.
Something went wrong with that request. Please try again.