简体   繁体   中英

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',        
},
}

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM