Is MongoAtlas supported with django?

54 views
Skip to first unread message

Periklis Gkolias

unread,
Mar 17, 2019, 3:37:41 PM3/17/19
to django...@googlegroups.com
Hi,

I am trying to connect my Django app to MongoDB atlas, using djongo. Here is my status:

I have set up a cluster successfully in Atlas. I am then getting the connection string details from the relevant console. With that knowledge, I am amending my DATABASES dict in settings.py

Here is the connection string:

mongodb+srv://<my_username>:<password>@<dbname>-<my-hostname>/test?retryWrites=true

Here is my dict.

DATABASES = {
'default': {
'ENGINE': 'djongo',
'USER': 'my_username',
'PASSWORD': 'password',
'NAME': 'test',
'HOST': '<dbname>-<my-hostname>',
'PORT': 27017

}
}

Do you find anything smelly? Has anyone done a similar setup? I would appreciate any documentation or hints on that matter

Thanks,
Periklis

Reply all
Reply to author
Forward
0 new messages