How to connect Django ORM to mongo atlas?

前端 未结 5 597
情深已故
情深已故 2020-12-21 10:41

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:

5条回答
  •  一整个雨季
    2020-12-21 11:21

    I just setup Djongo and MongoDB Atlas with the following:

    DATABASES = {
            'default': {
            'ENGINE': 'djongo',
            'NAME': '',
            'HOST': 'mongodb+srv://:@....mongodb.net/test?retryWrites=true',
            'USER': '',
            'PASSWORD': '',
        }
    }
    

    Hope that helps!

提交回复
热议问题