Nuju
Nuju

Reputation: 332

django_mongokit 0.2.6 not working in Django 1.11

I installed django_mongokit 0.2.6, but it's not working in Django 1.11. While run server shows below error, $ python manage.py runserver

Try using 'django.db.backends.XXX', where XXX is one of:
u'base', u'mysql', u'oracle', u'postgresql_psycopg2', u'sqlite3'
Error was: cannot import name BaseDatabaseOperations

Django : (1.11) Pymongo : (2.5) django-mongokit : (0.2.6) pymongo : (2.8) PyMySQL : (0.8.0)

settings.py

DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.mysql', 
    'NAME': 'example',        
},
'mongodb': {
    'ENGINE': 'django_mongokit.mongodb',
    'NAME': 'example',        
},
}

Upvotes: 0

Views: 41

Answers (1)

dahrens
dahrens

Reputation: 3959

At the end of the README:

If you get this error:

[...]

Then it's simply because you don't have mongokit itself installed.

pip install mongokit should help.

Upvotes: 0

Related Questions