1

I try to get Django 1.5.1 up and running with mongoengine as a second DB backend, but failing big times.

My settings.py includes the following:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'DaTaBaSe',                      
        'USER': 'root',
        'PASSWORD': '',
        'HOST': 'localhost', 
        'PORT': '3306',                  
    },
    'tracking': {
        'ENGINE': 'django.db.backends.dummy',
        'NAME': 'analytics',
    }
}

I have a DB router that already takes care of assigning the right app to the mongoDB, which seems to work, as I am seeing the following error in my celery task.

File "/mypath/base.py", line 15, in complain
raise ImproperlyConfigured("settings.DATABASES is improperly configured. "

ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

Any suggestion and idea is welcome.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
David
  • 646
  • 1
  • 7
  • 27
  • This may help: http://stackoverflow.com/questions/10707287/django-celery-routing-problems – alecxe Sep 03 '13 at 12:46
  • Unfortunately this is dealing with routing keys within Celery. This seems more like a Django "issue". – David Sep 03 '13 at 12:48
  • @David Do you get the error only in your task or even in django shell? – Germano Sep 03 '13 at 12:53
  • If I try to do this without Celery, I get the same error. settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details. – David Sep 03 '13 at 13:03

1 Answers1

1

'django.db.backends.dummy' is a dummy implementation Django will use when no ENGINE is given or ENGINE is an empty string. Every method of the backend API raises ImproperlyConfigured (except for connection.close() actually)

Germano
  • 2,452
  • 18
  • 25
  • I tried setting the DATABASES to dummy backend but still the same error. Inspecting settings.DATABASES return this: 'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.dummy', 'HOST': '', 'NAME': '', 'OPTIONS': {}, 'PASSWORD': '', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'USER': ''}} – dannyroa Feb 19 '14 at 18:21
  • Btw, I'm on Django 1.6.2. – dannyroa Feb 19 '14 at 18:22