Author: kmtracey
Date: 2011-07-05 17:21:32 -0700 (Tue, 05 Jul 2011)
New Revision: 16518

Modified:
   django/trunk/docs/ref/models/querysets.txt
Log:
s/get/filter in new example of how to use queryset update method: update won't 
work on a model instance.


Modified: django/trunk/docs/ref/models/querysets.txt
===================================================================
--- django/trunk/docs/ref/models/querysets.txt  2011-07-05 20:16:08 UTC (rev 
16517)
+++ django/trunk/docs/ref/models/querysets.txt  2011-07-06 00:21:32 UTC (rev 
16518)
@@ -1326,7 +1326,7 @@
 
 ...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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to