Skip to content

Instantly share code, notes, and snippets.

@banjocat
Created May 6, 2016 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banjocat/282e255db2f17d6edcdf70c1b295e32c to your computer and use it in GitHub Desktop.
Save banjocat/282e255db2f17d6edcdf70c1b295e32c to your computer and use it in GitHub Desktop.
Settings for django-cassandra local
DATABASES = {
'sqlite': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
},
'default': { # Run 'manage.py sync_cassandra'
'ENGINE': 'django_cassandra_engine',
'NAME': 'cassdb',
'USER': 'test',
'PASSWORD': 'test',
'TEST_NAME': 'test_test',
'HOST': 'localhost',
'OPTIONS': {
'replication': {
'strategy_class': 'SimpleStrategy',
'replication_factor': 1
},
'connection': {
'consistency': ConsistencyLevel.LOCAL_ONE,
'retry_connect': True,
#'port': 9042,
# + All connection options for cassandra.cluster.Cluster()
},
'session': {
'default_timeout': 10,
'default_fetch_size': 10000
# + All options for cassandra.cluster.Session()
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment