rubik
rubik

Reputation: 9104

Problems integrating MongoDB and Django 1.5

I want to use MongoDB as database backend for my Django project. Although there are many discussions on the net, I'm having troubles to integrate them well.

My goals:

As I understand that, mongoengine could meet all my requirements, but I'm having troubles making it work correclty.
Docs say to ignore DATABASES setting. If I don't specify it, Django raises an error, while if I fill it, Django creates that database and does not use my MongoDB instance, even though I call connect() later in the file. When I run syncdb Django uses the other database (the one I specified in the DATABASES setting) and not MongoDB. So when I fire up MongoDB shell I can see the database is created, but the only collection is startup_log, which I never created and I suspect it's created automatically.

Upvotes: 1

Views: 1618

Answers (1)

Ross
Ross

Reputation: 18111

This might be a change in the default requirements does adding a dummy backend to your settings help?

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.dummy'
    }
}

Upvotes: 1

Related Questions