Merge branch 'master' of github.com:kvesteri/sqlalchemy-utils
This commit is contained in:
@@ -46,6 +46,7 @@ from .types import (
|
|||||||
ScalarListException,
|
ScalarListException,
|
||||||
TimezoneType,
|
TimezoneType,
|
||||||
TSVectorType,
|
TSVectorType,
|
||||||
|
URLType,
|
||||||
UUIDType,
|
UUIDType,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -100,6 +101,7 @@ __all__ = (
|
|||||||
ScalarListType,
|
ScalarListType,
|
||||||
TimezoneType,
|
TimezoneType,
|
||||||
TSVectorType,
|
TSVectorType,
|
||||||
|
URLType,
|
||||||
UUIDType,
|
UUIDType,
|
||||||
database_exists,
|
database_exists,
|
||||||
create_database,
|
create_database,
|
||||||
|
|||||||
@@ -54,11 +54,12 @@ class JSONType(sa.types.TypeDecorator):
|
|||||||
"""
|
"""
|
||||||
impl = sa.UnicodeText
|
impl = sa.UnicodeText
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, *args, **kwargs):
|
||||||
if json is None:
|
if json is None:
|
||||||
raise ImproperlyConfigured(
|
raise ImproperlyConfigured(
|
||||||
'JSONType needs anyjson package installed.'
|
'JSONType needs anyjson package installed.'
|
||||||
)
|
)
|
||||||
|
super(JSONType, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
def load_dialect_impl(self, dialect):
|
def load_dialect_impl(self, dialect):
|
||||||
if dialect.name == 'postgresql':
|
if dialect.name == 'postgresql':
|
||||||
|
|||||||
Reference in New Issue
Block a user