Fix a few documentation issues.
This commit is contained in:
parent
6e35b8af84
commit
f423c079d9
@ -131,9 +131,9 @@ def loads(s, *args, **kwargs):
|
||||
Automatically passes the object_hook for BSON type conversion.
|
||||
|
||||
:Parameters:
|
||||
- `compile_re` (optional): if ``False``, don't attempt to compile
|
||||
BSON regular expressions into Python regular expressions. Return
|
||||
instances of :class:`~bson.bsonregex.BSONRegex` instead.
|
||||
- `compile_re` (optional): if ``False``, don't attempt to compile BSON
|
||||
regular expressions into Python regular expressions. Return instances
|
||||
of :class:`~bson.bsonregex.BSONRegex` instead.
|
||||
|
||||
.. versionchanged:: 2.7
|
||||
Added ``compile_re`` option.
|
||||
|
||||
@ -83,8 +83,8 @@ MotorEngine
|
||||
`MotorEngine <http://motorengine.readthedocs.org/>`_ is a port of
|
||||
MongoEngine to Motor, for asynchronous access with Tornado.
|
||||
It implements the same modeling APIs to be data-portable, meaning that a
|
||||
model defined in MongoEngine can be read in MotorEngine. The source `is on
|
||||
github <http://github.com/heynemann/motorengine>`_.
|
||||
model defined in MongoEngine can be read in MotorEngine. The source is
|
||||
`available on github <http://github.com/heynemann/motorengine>`_.
|
||||
|
||||
Framework Tools
|
||||
---------------
|
||||
|
||||
@ -105,7 +105,7 @@ class GridFS(object):
|
||||
try:
|
||||
f = new_file(**kwargs)
|
||||
f.write(data)
|
||||
finally
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
`data` can be either an instance of :class:`str` (:class:`bytes`
|
||||
@ -284,18 +284,18 @@ class GridFS(object):
|
||||
|
||||
Returns a cursor that iterates across files matching
|
||||
arbitrary queries on the files collection. Can be combined
|
||||
with other modifiers for additional control. For example
|
||||
with other modifiers for additional control. For example::
|
||||
|
||||
>>> for grid_out in fs.find({"filename": "lisa.txt"}, timeout=False):
|
||||
>>> data = grid_out.read()
|
||||
for grid_out in fs.find({"filename": "lisa.txt"}, timeout=False):
|
||||
data = grid_out.read()
|
||||
|
||||
would iterate through all versions of "lisa.txt" stored in GridFS.
|
||||
Note that setting timeout to False may be important to prevent the
|
||||
cursor from timing out during long multi-file processing work.
|
||||
|
||||
As another example, the call
|
||||
As another example, the call::
|
||||
|
||||
>>> most_recent_three = fs.find().sort("uploadDate", -1).limit(3)
|
||||
most_recent_three = fs.find().sort("uploadDate", -1).limit(3)
|
||||
|
||||
would return a cursor to the three most recently uploaded files
|
||||
in GridFS.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user