3

Can someone tell me how to use Django MongoDB Engine?

I have followed the instructions here: http://django-mongodb.org/topics/setup.html

All I get is this error:

django.core.exceptions.ImproperlyConfigured: 'django_mongodb_engine.mongodb' isn't an available database backend. 
Try using django.db.backends.XXX, where XXX is one of:
    'dummy', 'mysql', 'oracle', 'postgresql', 'postgresql_psycopg2', 'sqlite3'
Error was: No module named django_mongodb_engine.mongodb.base
Nicolas Cortot
  • 6,591
  • 34
  • 44
DrWolfe
  • 159
  • 4
  • 13

3 Answers3

4

Should be django_mongodb_engine, not django_mongodb_engine.mongodb.

Jonas H.
  • 2,331
  • 4
  • 17
  • 23
1

The problem is that the location where you downloaded the package is not in your PYTHONPATH, so django cannot import it.

If you followed those instructions, you need to run your application from the virtualenv you created (myproject in the example).

Or, you need to add it to your PYTHONPATH to make sure django can import it.

You should be able to run the python interactive shell and execute import django_mongodb_engine.mongodb without any errors.

Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284
-1

I found the answer with here: https://stackoverflow.com/questions/5699521/django-mongodb-i-cannot-update

Essentially one will need to install:

•django-mongodb-engine

•pymongo

•django-nonrel

•djangotoolbox

•mongoengine

Community
  • 1
  • 1
DrWolfe
  • 159
  • 4
  • 13