Use Mongodb as a backend database for your django project, without changing a single django model!!!
- pip install djongo
- Into settings.py file of your project, add:
DATABASES = { 'default': { 'ENGINE': 'djongo', 'NAME': 'your-db-name', } }
- Run
manage.py migrate
(ONLY the first time to create collections in mongoDB) - YOUR ARE SET! HAVE FUN!
- djongo requires python 3.5 or above.
djongo is a SQL to mongodb query compiler. It translates a SQL query string into a mongoDB query document. As a result, all Django features, models etc work as is.
Django contrib modules:
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.sessions',
and others... fully supported.
- Stop the immigrations.
- Embedded model.
- Embedded Array.
- Embedded Form Fields.
Read the full documentation
Any questions, suggestions for improvements or issues regarding the usage. Please raise a git-hub issue ticket.