Skip to content

Commit

Permalink
Merge 1d93828 into 6b63714
Browse files Browse the repository at this point in the history
  • Loading branch information
sethdenner committed Feb 16, 2017
2 parents 6b63714 + 1d93828 commit a2ad4e2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ setuptools*.egg
.py/
venv/
doc/build/
tests/migrations/
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ python:
- "2.7"

install:
- "pip install ."
- "pip install . --process-dependency-links"
- "pip install nose"
- pip install pillow

env:
- DJANGO_SETTINGS_MODULE=tests.settings
Expand Down
7 changes: 5 additions & 2 deletions djangocassandra/db/backends/cassandra/introspection.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import itertools

from django.db.backends import BaseDatabaseIntrospection
from django.db.backends.base.introspection import (
BaseDatabaseIntrospection,
TableInfo
)
from djangotoolbox.db.base import NonrelDatabaseIntrospection


Expand Down Expand Up @@ -59,7 +62,7 @@ def get_table_list(
if None is not current_keyspace:
cursor.set_keyspace(current_keyspace)

return [row[schema_table_name_field] for row in table_list]
return [TableInfo(row[schema_table_name_field], 't') for row in table_list]

def table_names(self, cursor=None):
return BaseDatabaseIntrospection.table_names(self, cursor)
2 changes: 1 addition & 1 deletion djangocassandra/db/backends/cassandra/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Text
)

from django.db.backends.schema import (
from django.db.backends.base.schema import (
BaseDatabaseSchemaEditor
)

Expand Down
12 changes: 8 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='djangocassandra',
version='0.8.0',
version='0.9.1',
description='Cassandra support for the Django web framework',
long_description=(
'The Cassandra database backend for Django has been '
Expand All @@ -22,7 +22,7 @@
license='BSD License',
classifiers=[
'Development Status :: 4 - Beta',
'Framework :: Django :: 1.7',
'Framework :: Django :: 1.8',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
Expand All @@ -39,9 +39,13 @@
'djangocassandra.db.backends.cassandra'
],
install_requires=[
'django>=1.7, < 1.8',
'django==1.8.17',
'cassandra-driver==3.7.0',
'blist',
'djangotoolbox==1.7.0'
'djangotoolbox==1.8.1'
],
dependency_links=[(
'https://github.com/Knotis/djangotoolbox/'
'archive/master.tar.gz#egg=djangotoolbox-1.8.1'
)]
)
6 changes: 4 additions & 2 deletions tests/test_introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ def test_get_table_list(self):
len(table_list),
len(self.models)
)

table_names = [ti.name for ti in table_list]
self.assertIn(
SimpleTestModel._meta.db_table,
table_list
table_names
)
self.assertIn(
PartitionPrimaryKeyModel._meta.db_table,
table_list
table_names
)

0 comments on commit a2ad4e2

Please sign in to comment.