summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-02-23 00:23:57 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-02-23 00:23:57 +0000
commite2f524ca09bacef4545b56dc3f136655fa0b912c (patch)
tree72d1ed487931a53fcb6505247e798c2d64449a2d /tests
parente2b3c50cf0445ff6d9c4c707f59ce64038d0fbb0 (diff)
queryset-refactor: Fixed the case of calling update() on a model manager.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7146 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/update/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/modeltests/update/models.py b/tests/modeltests/update/models.py
index 55b30cd3f5..3b0f83389f 100644
--- a/tests/modeltests/update/models.py
+++ b/tests/modeltests/update/models.py
@@ -56,5 +56,12 @@ Multiple fields can be updated at once
>>> d.value, d.another_value
(u'fruit', u'peaches')
+In the rare case you want to update every instance of a model, update() is also
+a manager method.
+
+>>> DataPoint.objects.update(value='thing')
+>>> DataPoint.objects.values('value').distinct()
+[{'value': u'thing'}]
+
"""
}