updated QuerySet.only docstring

This commit is contained in:
blackbrrr 2010-02-24 09:52:39 -06:00
parent 8b1a39f2c1
commit 1b68efe7c7

View File

@ -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