summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKaren Tracey <kmtracey@gmail.com>2011-07-06 00:21:32 +0000
committerKaren Tracey <kmtracey@gmail.com>2011-07-06 00:21:32 +0000
commit901ea8a68d4aa064f2e72eeac5ca87968905673e (patch)
treebe44a9fa33871c582b778a66e000e8a932865609 /docs
parent471a841147ca9bb6a5cae8981be6d66ec42966a0 (diff)
s/get/filter in new example of how to use queryset update method: update won't work on a model instance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/querysets.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index aaf6a97a03..a1bd5ccb7b 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -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