I am trying to connect my django instance to a mongo db cluster using django. I have checked from various sources and the way it is getting closer to work is:
Simplest and correct solution:
Step 1: Install djongo and dnspython
pip install djongo
pip install dnspython
Step 2: Changes in settings.py:
DATABASES = {
"default": {
"ENGINE": "djongo",
"CLIENT": {
"host": "mongodb+srv://:@.mongodb.net/?retryWrites=true&w=majority",
"username": "",
"password": "",
"name": "",
"authMechanism": "SCRAM-SHA-1",
},
}}