Docs, queryset.update: full_result-arg not clearly described

The documentation for the `full_result`-argument to `queryset.update()`
can be read as returning the update documents/objects, whereas it's
really returning just the full "PyMongo result dictionary".

This commit adds some wording and an example dictionary,
to make it clear what the behavior is.
This commit is contained in:
Malthe Jørgensen 2018-03-27 14:14:08 +02:00 committed by GitHub
parent dabe8c1bb7
commit e46779f87b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -486,8 +486,9 @@ class BaseQuerySet(object):
``save(..., write_concern={w: 2, fsync: True}, ...)`` will ``save(..., write_concern={w: 2, fsync: True}, ...)`` will
wait until at least two servers have recorded the write and wait until at least two servers have recorded the write and
will force an fsync on the primary server. will force an fsync on the primary server.
:param full_result: Return the full result rather than just the number :param full_result: Return the full result dictionary rather than just the number
updated. updated, e.g. return
`{u'n': 2, u'nModified': 2, u'ok': 1.0, 'updatedExisting': True}`.
:param update: Django-style update keyword arguments :param update: Django-style update keyword arguments
.. versionadded:: 0.2 .. versionadded:: 0.2