-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Critical - P2
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
Completed
-
-
None
-
None
-
None
-
None
-
None
-
None
Based on the documentation provided on github:
```
Configuring the DATABASES setting
https://github.com/mongodb-labs/django-mongodb#configuring-the-databases-setting
After you've set up a project, configure Django's DATABASES setting similar to this:
DATABASES = { "default":
, }, }
OPTIONS is an optional dictionary of parameters that will be passed to MongoClient.
```
This works fine on a local definition, but can quickly be confusing for someone connecting to atlas. A typical atlas user would place their URI into the "host" section and leave it as is. Here, an end-user would have to pass their MongoDB URI into the `host` section (usually this already contains the user:password authentication) and then, additionally, add in the user/password components in the dictionary.
It miscommunicates URI construction. If one were to try and connect to an atlas cluster, they would either have to:
- Have to manually parse the URI and break it into components
- Be unable to provide the `pymongo+srv` protocol somewhere in the URI construction (because 'host' colloquially is closer to 'hostname' defined for Django)
- Pass the URI completely and then pass the user and password.
We need to change the instructions we give users outside of "use the dj-database-url" and make sure we still make it simple enough to connect to a mongodb cluster.