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:
- Install dnspython
- Have the following
DATABASES
dict insettings.py
DATABASES = {
'default': {
'ENGINE': 'djongo',
'NAME': 'test',
'HOST': 'mongodb+srv://mongo_usr:' + urllib.parse.quote('mypassword') + '@domain_assigned.mongodb.net/test?ssl=true&ssl_cert_reqs=CERT_NONE&retryWrites=true',
'ENFORCE_SCHEMA': False
}
}
It truly finds the endpoint but I am getting a weird error:
pymongo.errors.ServerSelectionTimeoutError: connection closed,connection closed,connection closed
has anyone fixed this before?