0

I need to connect to my web app in django to mongodb and postgresql to do CRUD operations on it, here is the code of the project that it´s on git hub.

Here is the file where I made the connections to mongodb (isn´t working).

And this is the link of the project

galoget
  • 722
  • 9
  • 15
Melany
  • 71
  • 5

1 Answers1

0

Here is the info which might be useful to setup Mongo DB and PostgreSQL.

For Mongo DB connection setup,

DATABASES = {
  'default' : {
  'ENGINE' : 'django_mongodb_engine',
  'NAME' : 'my_database'
}}

For PostgreSQL connection setup,

DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'your_project_name',
    'USER': 'project_user',
    'PASSWORD': 'password',
    'HOST': 'localhost',
    'PORT': '',
}}

Connection setup must be added in settings.py file. Hope you know that.

Sanjay Pradeep
  • 407
  • 5
  • 6