updated QuerySet.only docstring
This commit is contained in:
parent
8b1a39f2c1
commit
1b68efe7c7
@ -436,6 +436,12 @@ class QuerySet(object):
|
||||
return self._document._from_son(self._cursor[key])
|
||||
|
||||
def only(self, *fields):
|
||||
"""Load only a subset of this document's fields. ::
|
||||
|
||||
post = BlogPost.objects(...).only("title")
|
||||
|
||||
:param *fields: fields to include
|
||||
"""
|
||||
self._loaded_fields = list(fields)
|
||||
return self
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user