We have build our environment using Django 1.7
, Mongoengine 0.8.7
, MongoDB 2.4.7
and Python 3.4
.
We have installed django-rest-framework , but when we try to run the example of the website, we get the following error:
ImproperlyConfigured at /users/
settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
Request Method: GET
Request URL: http://localhost:8000/users/
Django Version: 1.7
Exception Type: ImproperlyConfigured
Exception Value:
settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
Exception Location: /Users/user_name/Development/projects/current_project/lib/python3.4/site-packages/django/db/backends/dummy/base.py in complain, line 18
Python Executable: /Users/user_name/Development/projects/current_project/bin/uwsgi
Python Version: 3.4.1
Python Path:
['.',
'',
'/Users/user_name/Development/projects/current_project/lib/python34.zip',
'/Users/user_name/Development/projects/current_project/lib/python3.4',
'/Users/user_name/Development/projects/current_project/lib/python3.4/plat-darwin',
'/Users/user_name/Development/projects/current_project/lib/python3.4/lib-dynload',
'/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4',
'/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/plat-darwin',
'/Users/user_name/Development/projects/current_project/lib/python3.4/site-packages']
This is what we have changed in our settings.py
according to the documentation that we have found:
import mongoengine
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.dummy',
}
}
mongoengine.connect('database_name', username='root', password='password')
SESSION_ENGINE = 'mongoengine.django.sessions'
SESSION_SERIALIZER = 'mongoengine.django.sessions.BSONSerializer'
For what we have seen, if we connect through the mongoengine.connect
method the ENGINE parameter should not be ignored, but we are finding this error instead. Anyone knows how we could solve it?