diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-02-23 00:23:57 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-02-23 00:23:57 +0000 |
| commit | e2f524ca09bacef4545b56dc3f136655fa0b912c (patch) | |
| tree | 72d1ed487931a53fcb6505247e798c2d64449a2d /tests | |
| parent | e2b3c50cf0445ff6d9c4c707f59ce64038d0fbb0 (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.py | 7 |
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'}] + """ } |
