Nitrousio Django Mongodb support

163 Views Asked by At

I'm trying to setup mongodb on my nitrousio django box. Following this tutorial.

But when I try to start my django server I'm getting the next error:

action@django-box-25197:~/workspace/django/mysite$ python manage.py runserver 0.0.0.0:3000
ImproperlyConfigured: 'django_mongodb_engine' isn't an available database backend.                                                                                                                                                                                   
Try using 'django.db.backends.XXX', where XXX is one of: u'mysql', u'oracle', u'postgresql_psycopg2', u'sqlite3'                                                                                                                                                                                                          
Error was: No module named django_mongodb_engine.base                                                                                                                                                                                                                
action@django-box-25197:~/workspace/django/mysite$ 

I was reading about this error and I think that the Django-nonrel is not installed by default in the django's boxes and I want to know how can I use mongodb in my django box

Here is my dababase settings.py:

DATABASES = {
'default': {
    'ENGINE': 'django_mongodb_engine', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
    'NAME': os.environ['MONGODB_DEVELOPMENT_DB'],                      # Or path to database file if using sqlite3.
    # The following settings are not used with sqlite3:
    'USER': os.environ['MONGODB_DEVELOPMENT_USERNAME'],
    'PASSWORD': os.environ['MONGODB_DEVELOPMENT_PASSWORD'],
    'HOST': os.environ['MONGODB_DEVELOPMENT_HOST'],                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
    'PORT': os.environ['MONGODB_DEVELOPMENT_PORT'],                      # Set to empty string for default.
}}

Thanx in advance! :)

0

There are 0 best solutions below