Skip to content

Commit f40a275

Browse files
committed
provide motivation
1 parent c95fdc3 commit f40a275

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,15 @@ DATABASES = {
121121
`OPTIONS` is an optional dictionary of parameters that will be passed to
122122
[`MongoClient`](https://pymongo.readthedocs.io/en/stable/api/pymongo/mongo_client.html).
123123

124-
Alternatively, you can configure Django's `DATABASES` with
125-
`django_mongodb.parse(uri)`:
124+
Alternatively, those that follow the [twelve-factor app methodology](
125+
https://www.12factor.net/backing-services) can configure Django's `DATABASES`
126+
with `django_mongodb.parse_uri(MONGODB_URI)`:
126127

127128
```python
128129
import django_mongodb
129130

130-
MONGODB_URI = "mongodb://<my_user>:<my_password>@localhost:27017/my_database"
131-
DATABASES["default"] = django_mongodb.parse(MONGODB_URI)
131+
MONGODB_URI = "mongodb+srv://myDatabaseUser:D1fficultP%40s[email protected]/myDatabase?retryWrites=true&w=majority&tls=false"
132+
DATABASES["default"] = django_mongodb.parse_uri(MONGODB_URI)
132133
```
133134

134135
Congratulations, your project is ready to go!

0 commit comments

Comments
 (0)