2

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

2
  • Can't you remove the default overall? Commented Oct 22, 2016 at 14:35
  • 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' Commented Oct 22, 2016 at 14:44

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.