Skip to content

DOCSP-46328: Django connection configuration #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions source/configure-connection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@
connection.

To configure the ``default`` key, include the following
fields:
nested keys:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To configure the default database, include the following nested dictionary.


.. list-table::
:header-rows: 1
:widths: 20 80

* - Field
* - Key
- Description

* - **ENGINE**
- The backend driver to use for the connection. Set this field to ``"django_mongodb_backend"``.
- The backend driver to use for the connection. Set this key to ``"django_mongodb_backend"``.

* - **HOST**
- | Your connection URI. For localhost connections, this field is optional.
- | Your connection URI. For localhost connections, this key is optional.
| For SRV connections, you must include a scheme prefix (``mongodb+srv://``).
|
| If connecting to a replica set or sharded cluster with multiple hosts, specify
Expand All @@ -81,10 +81,10 @@

* - **PORT**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you can say the default port is 27017

- | The port number on which the database server is listening.
| For MongoDB Atlas connections, this field is optional.
| For MongoDB Atlas connections, this key is optional.

* - **OPTIONS**
- A dictionary of additional connection options for the database. This field is optional.
- A dictionary of additional connection options for the database. This key is optional.

Check failure on line 87 in source/configure-connection.txt

View workflow job for this annotation

GitHub Actions / TDBX Vale rules

[vale] reported by reviewdog 🐶 [MongoDB.ConciseTerms] 'more' is preferred over 'additional'. Raw Output: {"message": "[MongoDB.ConciseTerms] 'more' is preferred over 'additional'.", "location": {"path": "source/configure-connection.txt", "range": {"start": {"line": 87, "column": 24}}}, "severity": "ERROR"}

.. _django-manual-config-example:

Expand Down Expand Up @@ -125,7 +125,7 @@
.. tip::
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s: move this to the OPTIONS row above (and take out of tip box to avoid nested admonition)


To see a full list of connection options that you
can set in the ``OPTIONS`` field, see the optional
can set in the ``OPTIONS`` nested key, see the optional

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/key/dictionary/, otherwise, nice!

parameters for `MongoClient <https://pymongo.readthedocs.io/en/4.10.1/api/pymongo/mongo_client.html#pymongo.mongo_client.MongoClient>`__
in the PyMongo API documentation.

Expand Down
Loading