@@ -49,6 +49,8 @@ def __init__(self, database, name, options=None):
4949 - `options`: dictionary of collection options. see
5050 :meth:`~pymongo.database.Database.create_collection` for
5151 details.
52+
53+ .. mongodoc:: collections
5254 """
5355 if not isinstance (name , basestring ):
5456 raise TypeError ("name must be an instance of basestring" )
@@ -169,6 +171,8 @@ def save(self, to_save, manipulate=True, safe=False):
169171 - `to_save`: the SON object to be saved
170172 - `manipulate` (optional): manipulate the SON object before saving it
171173 - `safe` (optional): check that the save succeeded?
174+
175+ .. mongodoc:: insert
172176 """
173177 if not isinstance (to_save , dict ):
174178 raise TypeError ("cannot save object of type %s" % type (to_save ))
@@ -201,6 +205,8 @@ def insert(self, doc_or_docs,
201205
202206 .. versionchanged:: 1.1
203207 Bulk insert works with any iterable
208+
209+ .. mongodoc:: insert
204210 """
205211 docs = doc_or_docs
206212 if isinstance (docs , dict ):
@@ -275,6 +281,8 @@ def update(self, spec, document,
275281
276282 .. _update modifiers: http://www.mongodb.org/display/DOCS/Updating
277283 .. _upsert: http://www.mongodb.org/display/DOCS/Updating#Updating-Upserts
284+
285+ .. mongodoc:: update
278286 """
279287 if not isinstance (spec , dict ):
280288 raise TypeError ("spec must be an instance of dict" )
@@ -328,6 +336,8 @@ def remove(self, spec_or_object_id=None, safe=False):
328336 removed.
329337 .. versionadded:: 1.1
330338 The `safe` parameter.
339+
340+ .. mongodoc:: remove
331341 """
332342 spec = spec_or_object_id
333343 if spec is None :
@@ -511,6 +521,8 @@ def create_index(self, key_or_list, unique=False, ttl=300):
511521 .. seealso:: :meth:`ensure_index`
512522
513523 .. _compound index: http://www.mongodb.org/display/DOCS/Indexes#Indexes-CompoundKeysIndexes
524+
525+ .. mongodoc:: indexes
514526 """
515527 if not isinstance (key_or_list , (str , unicode , list )):
516528 raise TypeError ("key_or_list must either be a single key "
@@ -774,6 +786,8 @@ def map_reduce(self, map, reduce, full_response=False, **kwargs):
774786 .. versionadded:: 1.2
775787
776788 .. _map reduce command: http://www.mongodb.org/display/DOCS/MapReduce
789+
790+ .. mongodoc:: mapreduce
777791 """
778792 command = SON ([("mapreduce" , self .__name ),
779793 ("map" , map ), ("reduce" , reduce )])
0 commit comments