@@ -23,14 +23,14 @@ Overview
2323In this guide, you can learn how to configure your Django project's
2424connection to MongoDB.
2525
26- Connection Configuration
26+ Connection Configuration
2727------------------------
2828
2929After installing {+django-odm+} and creating a project, you can configure
3030your connection to MongoDB in the following ways:
3131
3232- :ref:`django-connection-configure-manual` by specifying the
33- ``DATABASES`` variable in your project's settings.
33+ ``DATABASES`` setting in your project's settings.
3434- :ref:`django-connection-configure-automatic` by using
3535 the ``parse_uri()`` function.
3636
@@ -44,10 +44,9 @@ your connection to MongoDB in the following ways:
4444Manually Configure Database Settings
4545~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4646
47- To manually configure your connection to MongoDB, update
48- the ``DATABASES`` variable in your project's ``settings.py``
49- file. Set the ``DATABASES`` variable to a dictionary value containing
50- the ``default`` key, as shown in the following example:
47+ To manually configure your connection to MongoDB, update the
48+ ``DATABASES`` setting in your project's ``settings.py`` file. Set it to
49+ a dictionary containing the ``default`` key:
5150
5251.. code-block:: python
5352
@@ -71,7 +70,7 @@ This nested dictionary has the following keys:
7170 - The backend driver to use for the connection. Set this key to ``"django_mongodb_backend"``.
7271
7372 * - **HOST**
74- - | Your connection URI. For localhost connections, this key is optional.
73+ - | Your connection URI. For localhost connections, this key is optional.
7574 | For SRV connections, you must include a scheme prefix (``mongodb+srv://``).
7675 |
7776 | To specify more than one host, include all hostnames in one string. Use
@@ -101,11 +100,10 @@ This nested dictionary has the following keys:
101100
102101.. _django-manual-config-example:
103102
104- Example
103+ Example
105104```````
106105
107- In this example, the ``DATABASES`` variable performs the
108- following actions:
106+ In this example, the ``DATABASES`` setting performs the following actions:
109107
110108- Sets the database to ``my_database``
111109- Provides authentication information for a database user
@@ -146,15 +144,15 @@ function accepts the following arguments:
146144
147145- ``uri``: Your MongoDB connection URI.
148146- ``conn_max_age``: Configures persistent database connections.
149- This argument is optional. To learn more, see
147+ This argument is optional. To learn more, see
150148 `Persistent connections <{+django-docs+}/ref/databases/#persistent-database-connections>`__
151149 in the {+framework+} documentation.
152150- ``test``: Provides a dictionary of settings for test
153- databases. This argument is optional. To learn more, see
151+ databases. This argument is optional. To learn more, see
154152 `the TEST setting <{+django-docs+}/ref/settings/#test>`__
155153 in the {+framework+} documentation.
156154
157- Example
155+ Example
158156```````
159157
160158The following example uses the ``parse_uri()`` function to specify
@@ -176,4 +174,4 @@ see the :ref:`django-get-started-connect` step in the Getting Started
176174tutorial.
177175
178176To learn more about {+framework+} settings, see `Settings <{+django-docs+}/ref/settings/>`__
179- in the {+framework+} documentation.
177+ in the {+framework+} documentation.
0 commit comments