Comments (11)
Please make sure that your DATABASES settings are correct. Looking at testproject may help with it.
from django-cassandra-engine.
Maybe the full stack is important:
Performing system checks...
Unhandled exception in thread started by <function wrapper at 0x7f132c4ade60>
System check identified no issues (0 silenced).
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 222, in wrapper
fn(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 107, in inner_run
self.check_migrations()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 159, in check_migrations
executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 17, in init
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 48, in init
self.build_graph()
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 179, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 59, in applied_migrations
self.ensure_schema()
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 49, in ensure_schema
if self.Migration._meta.db_table in self.connection.introspection.get_table_list(self.connection.cursor()):
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/init.py", line 1383, in get_table_list
raise NotImplementedError('subclasses of BaseDatabaseIntrospection may require a get_table_list() method')
NotImplementedError: subclasses of BaseDatabaseIntrospection may require a get_table_list() method
from django-cassandra-engine.
This tells you that django is using it's default database wrapper instead of cassandra's. Once again: something is wrong with your settings.. Maybe you forgot to add 'django_cassandra_engine' to your installed apps?
from django-cassandra-engine.
Yes, am sure am doing something wrong.. I just need to find out what :)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'api',
#the docs say this one has to be last:
'django_cassandra_engine',
)
from django-cassandra-engine.
Try with "projectname.api' :)
from django-cassandra-engine.
no luck with that change. 'api' app is not inside 'projectname" which is how PyCharm seems to like to do these things...
Is it normal that this does not mention keyspace and models being processed:
➜ /tmp git clone https://github.com/r4fek/django-cassandra-engine.git
Cloning into 'django-cassandra-engine'...
remote: Counting objects: 211, done.
remote: Total 211 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (211/211), 32.90 KiB | 0 bytes/s, done.
Resolving deltas: 100% (123/123), done.
Checking connectivity... done.
➜ /tmp cd django-cassandra-engine/testproject
➜ testproject git:(master) ./manage.py syncdb
Operations to perform:
Synchronize unmigrated apps: django_cassandra_engine, app
Apply all migrations: admin, contenttypes, auth, sessions
Synchronizing apps without migrations:
Creating tables...
Installing custom SQL...
Installing indexes...
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying sessions.0001_initial... OK
You have installed Django's auth system, and don't have any superusers defined.
Would you like to create one now? (yes/no): no
from django-cassandra-engine.
From the testproject settings DATABASES, if I remove 'default' and rename 'cassandra' to 'default', I seem to reproduce my problem:
➜ testproject git:(master) ✗ ./manage.py syncdb
Creating keyspace db..
➜ testproject git:(master) ✗
from django-cassandra-engine.
It works. Closing
from django-cassandra-engine.
Still have problem when I use cassandra as default db...
in testproject sqllite3 is defaultdb.....
if I try to set cassandra as default db using the sample in README file as follows, I also get the NotImplementedError: subclasses of BaseDatabaseIntrospection may require a get_table_list() method error :
DATABASES = {
'default': {
'ENGINE': 'django_cassandra_engine',
'NAME': 'db',
'TEST_NAME': 'test_db',
'HOST': '12.0.0.1',
'OPTIONS': {
'replication': {
'strategy_class': 'SimpleStrategy',
'replication_factor': 1
}
}
}
}
Is there a way that I can use cassandra as default database of django.....????
from django-cassandra-engine.
Yes, there is. But your default django apps like admin, auth, contentypes will not work with cassandra, as they require relational database in order to work properly.
If you don't need django apps, django_cassandra_engine could be used as default database alias. We're using it at Opera in many projects.
If you have any problems with running this engine please see the docs (especially FAQ section). http://r4fek.github.io/django-cassandra-engine/
from django-cassandra-engine.
Could you guys check it with v0.1.1?
from django-cassandra-engine.
Related Issues (20)
- Can't delete from admin - You cannot .filter() on a DjangoCassandraQuerySet which has been ordered using python HOT 1
- Support for values_list 'named' keyword argument
- Django 3.0 support HOT 4
- admin ui HOT 1
- TypeError: sql_flush() got an unexpected keyword argument 'reset_sequences' HOT 2
- Date must be mapped to DateField in serializers
- Creating keyspace but models are not syncing HOT 2
- Multiple cassandra configurations HOT 5
- Stale Cached Response on GET HOT 2
- Can I use Scylla's scylla-driver with this? HOT 1
- built-in ORM HOT 3
- Error while connecting to AWS Keyspace HOT 2
- django cassnadra migration HOT 1
- Does this library support connecting through TLS (if possible, with client cert auth)?
- Discord server HOT 1
- Can't connect to K8ssandra in minikube, problem with settings HOT 1
- django 3.2 LTS support & Python 3.7+ only
- Looking for a way to dump any CQL statement to logging
- cassandra.cluster.NoHostAvailable
- sync_cassandra command fails after syncing 1 model HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-cassandra-engine.