File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -121,14 +121,15 @@ DATABASES = {
121
121
` OPTIONS ` is an optional dictionary of parameters that will be passed to
122
122
[ ` MongoClient ` ] ( https://pymongo.readthedocs.io/en/stable/api/pymongo/mongo_client.html ) .
123
123
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) ` :
126
127
127
128
``` python
128
129
import django_mongodb
129
130
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 )
132
133
```
133
134
134
135
Congratulations, your project is ready to go!
You can’t perform that action at this time.
0 commit comments