Doc fixes, thanks @3Inc

Author:    Slam <3lnc.slam@gmail.com>
Date:      Fri Nov 28 13:10:38 2014 +0200
This commit is contained in:
Slam
2014-11-28 13:10:38 +02:00
committed by Wilson Júnior
parent 2b3bb81fae
commit 51f314e907
10 changed files with 112 additions and 71 deletions

View File

@@ -428,6 +428,7 @@ class ObjectIdField(BaseField):
class GeoJsonBaseField(BaseField):
"""A geo json field storing a geojson style object.
.. versionadded:: 0.8
"""
@@ -436,8 +437,8 @@ class GeoJsonBaseField(BaseField):
def __init__(self, auto_index=True, *args, **kwargs):
"""
:param auto_index: Automatically create a "2dsphere" index. Defaults
to `True`.
:param bool auto_index: Automatically create a "2dsphere" index.\
Defaults to `True`.
"""
self._name = "%sField" % self._type
if not auto_index:

View File

@@ -193,7 +193,7 @@ class Document(BaseDocument):
in the database doesn't match the query.
.. note:: All unsaved changes that has been made to the document are
rejected if the method returns True.
rejected if the method returns True.
:param query: the update will be performed only if the document in the
database matches the query
@@ -250,6 +250,7 @@ class Document(BaseDocument):
:param _refs: A list of processed references used in cascading saves
:param save_condition: only perform save if matching record in db
satisfies condition(s) (e.g., version number)
.. versionchanged:: 0.5
In existing documents it only saves changed fields using
set / unset. Saves are cascaded and any

View File

@@ -1860,6 +1860,7 @@ class PointField(GeoJsonBaseField):
to set the value.
Requires mongodb >= 2.4
.. versionadded:: 0.8
"""
_type = "Point"
@@ -1879,6 +1880,7 @@ class LineStringField(GeoJsonBaseField):
You can either pass a dict with the full information or a list of points.
Requires mongodb >= 2.4
.. versionadded:: 0.8
"""
_type = "LineString"
@@ -1901,6 +1903,7 @@ class PolygonField(GeoJsonBaseField):
holes.
Requires mongodb >= 2.4
.. versionadded:: 0.8
"""
_type = "Polygon"
@@ -1921,6 +1924,7 @@ class MultiPointField(GeoJsonBaseField):
to set the value.
Requires mongodb >= 2.6
.. versionadded:: 0.9
"""
_type = "MultiPoint"
@@ -1941,6 +1945,7 @@ class MultiLineStringField(GeoJsonBaseField):
You can either pass a dict with the full information or a list of points.
Requires mongodb >= 2.6
.. versionadded:: 0.9
"""
_type = "MultiLineString"
@@ -1968,6 +1973,7 @@ class MultiPolygonField(GeoJsonBaseField):
of Polygons.
Requires mongodb >= 2.6
.. versionadded:: 0.9
"""
_type = "MultiPolygon"

View File

@@ -402,6 +402,7 @@ class BaseQuerySet(object):
will force an fsync on the primary server.
:param _from_doc_delete: True when called from document delete therefore
signals will have been triggered so don't loop.
:returns number of deleted documents
"""
queryset = self.clone()
@@ -989,7 +990,7 @@ class BaseQuerySet(object):
def aggregate(self, *pipeline, **kwargs):
"""
Perform a aggregate function based in your queryset params
:param pipeline: list of aggregation commands,
:param pipeline: list of aggregation commands,\
see: http://docs.mongodb.org/manual/core/aggregation-pipeline/
.. versionadded:: 0.9