Skip to content

Commit 0e1fe4f

Browse files
committed
clarify documentation
a few places still referred to MongoReplicaSetClient, and one place was missing a link to PyMongo docs.
1 parent 3738580 commit 0e1fe4f

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

docs/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,8 @@ Classes
136136

137137
.. attribute:: cx
138138

139-
The :class:`~flask_pymongo.wrappers.MongoClient` or
140-
:class:`~flask_pymongo.wrappers.MongoReplicaSetClient`, depending on
141-
the type of connection described by the URI.
139+
The :class:`~flask_pymongo.wrappers.MongoClient` connected to the
140+
MongoDB server.
142141

143142
.. attribute:: db
144143

flask_pymongo/__init__.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,6 @@ class PyMongo(object):
100100
variable, or as an argument to the constructor or ``init_app``. See
101101
:meth:`init_app` for more detail.
102102
103-
.. versionchanged:: 2.0
104-
105-
Flask-PyMongo no longer accepts many of the configuration variables
106-
it did in previous versions. You must now use a MongoDB URI to
107-
configure Flask-PyMongo.
108-
109103
"""
110104

111105
def __init__(self, app=None, uri=None, *args, **kwargs):
@@ -118,12 +112,11 @@ def __init__(self, app=None, uri=None, *args, **kwargs):
118112
def init_app(self, app, uri=None, *args, **kwargs):
119113
"""Initialize this :class:`PyMongo` for use.
120114
121-
Configure a :class:`~pymongo.mongo_client.MongoClient` or
122-
:class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`
115+
Configure a :class:`~pymongo.mongo_client.MongoClient`
123116
in the following scenarios:
124117
125118
1. If ``uri`` is not ``None``, pass the ``uri`` and any positional
126-
or keyword arguments to MongoClient
119+
or keyword arguments to :class:`~pymongo.mongo_client.MongoClient`
127120
2. If ``uri`` is ``None``, and a Flask config variable named
128121
``MONGO_URI`` exists, use that as the ``uri`` as above.
129122

0 commit comments

Comments
 (0)