I am new to django, I have created a project and app and I would like to connect my project to the mongodb. when I enter python manage.py migrate
command , I am getting below mentioned error.
I have dropped database and cleared all migrations in the django_migration table and deleted migration files in the created migrations folder. Still getting same error.
Please help me with this. Thanks in advance
Error:
raise TypeError("documents must be a non-empty list")
TypeError: documents must be a non-empty list
The above exception was the direct cause of the following exception:
djongo.sql2mongo.SQLDecodeError: FAILED SQL: INSERT INTO "django_migrations" ("app", "name", "applied") VALUES (%(0)s, %(1)s, %(2)s)
Version: 1.2.31
Settings.py
DATABASES = {
'default': {
'ENGINE': 'djongo',
'NAME': 'DB_name',
'HOST':'localhost',
# 'PORT': 27017,
# 'USER':'',
# 'PASSWORD':''
},
models.py
from django.db import models
# Create your models here.
class dummy(models.Model):
name= models.CharField(max_length=100, blank=True, null= True)