Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django.core.exceptions.ImproperlyConfigured: 'django_mongodb_engine' isn't an available database backend

I'm unable to run django mongo engine properly.

My database entry in settings.py is

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

and my pip freeze result is

Django==1.8.2
django-mongodb-engine==0.5.2
djangotoolbox==1.6.2
pymongo==3.0.2

error while running

python manage.py runserver

is

django.core.exceptions.ImproperlyConfigured: 'django_mongodb_engine' isn't an available database backend.
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 BaseDatabaseFeatures

Any suggestions how to solve this.

like image 379
randomuser Avatar asked May 29 '15 10:05

randomuser


3 Answers

You need django-nonrel installed as well, as per the documentation.

like image 119
SaeX Avatar answered Oct 21 '22 04:10

SaeX


Try uninstalling 'Pymongo' and install it as 'pip install pymongo' as compared to installing it via an ide

like image 30
Piyush Singh Avatar answered Oct 21 '22 05:10

Piyush Singh


If you are using djongo and face this error when you call make migrations do this:

Open terminal and install pytz (pip install pytz)

like image 4
Mohammad reza Ayubi Avatar answered Oct 21 '22 04:10

Mohammad reza Ayubi