$ pip install django-cassandra-engine
INSTALLED_APPS = ['django_cassandra_engine']
Standart
DATABASES = {
'default': {
'ENGINE': 'django_cassandra_engine',
'NAME': 'db',
'TEST_NAME': 'test_db',
'HOST': 'db1.example.com,db2.example.com',
'OPTIONS': {
'replication': {
'strategy_class': 'SimpleStrategy',
'replication_factor': 1
}
}
}
}
Cassandra create new user cqlsh :
DATABASES = {
'default': {
'ENGINE': 'django_cassandra_engine',
'NAME': 'db',
'TEST_NAME': 'test_db',
'USER_NAME'='cassandradb',
'PASSWORD'= '123cassandra',
'HOST': 'db1.example.com,db2.example.com',
'OPTIONS': {
'replication': {
'strategy_class': 'SimpleStrategy',
'replication_factor': 1
}
}
}
}