After serializing the model in view when i am trying to enter the RESTapi url getting error settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
using mongoengine so haven't set any database. Worked perfectly before tried api integration
settings.py
import mongoengine
DBNAME = 'database'
MONGO_HOST = 'localhost'
MONGO_PORT = 27017
mongoengine.connect(DBNAME,host=MONGO_HOST, port=MONGO_PORT)
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'rest_framework_mongoengine',
'api'
)
DATABASES = {
'default': {
'ENGINE': '',
'NAME': '',
}
}
by mongo docs setup did you try it? by django docs databases
to be used with Django
but you just createmongoengine.connect
inside your settins, and it does not used by django.and have you look on the python-eve for create mongodb-restapi?