2
votes

I am getting the following error:

ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE VALUE.

My settings.py looks like:

DATABASES = {
'default': {
},
'postgres': {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'app',
    'USER':'user',
    'HOST': 'localhost',
},
'cassandra': {
    'ENGINE': 'django_cassandra_engine',
    'NAME': 'app',
    'HOST': '127.0.0.1',
    'OPTIONS': {
        'replication': {
            'strategy_class': 'SimpleStrategy',
            'replication_factor': 1
        },
        'connection': {
            'consistency': ConsistencyLevel.LOCAL_ONE,
            'port': 9042,
            'retry_connect': True
            # + All connection options for cassandra.cluster.Cluster()
        },
        'session': {
            'default_timeout': 10,
            'default_fetch_size': 10000
            # + All options for cassandra.cluster.Session()
        }
    }
}
}

runserver, syncdb are working fine. The error pops up when I access the index page.

Is there something I am doing wrong?

Thanks in advance :)

/Saha

1
Can't you remove the default overall? - wanaryytel
I thought of that too. But apparently it's not possible. It NEEDS a default either empty or not. If I remove default, I get the KeyError: 'default' - Nirlendu Saha

1 Answers

1
votes

The DATABASES setting must configure a default database; any number of additional databases may also be specified.

You cannot have empty default setting.

This is from the Django docs. Django settings documentations