removed circular import for validators
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.6.1-stable+timestamp.2013.09.13.15.41.09
|
Version 2.6.1-stable+timestamp.2013.09.13.17.13.49
|
||||||
|
|||||||
+3
-7
@@ -234,12 +234,6 @@ except ImportError:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
simplejson = None
|
simplejson = None
|
||||||
|
|
||||||
try:
|
|
||||||
from gluon import validators
|
|
||||||
have_validators = True
|
|
||||||
except (ImportError, SyntaxError):
|
|
||||||
have_validators = False
|
|
||||||
|
|
||||||
LOGGER = logging.getLogger("web2py.dal")
|
LOGGER = logging.getLogger("web2py.dal")
|
||||||
DEFAULT = lambda:0
|
DEFAULT = lambda:0
|
||||||
|
|
||||||
@@ -6872,7 +6866,9 @@ def sqlhtml_validators(field):
|
|||||||
fieldtype
|
fieldtype
|
||||||
"""
|
"""
|
||||||
db = field.db
|
db = field.db
|
||||||
if not have_validators:
|
try:
|
||||||
|
from gluon import validators
|
||||||
|
except ImportError:
|
||||||
return []
|
return []
|
||||||
field_type, field_length = field.type, field.length
|
field_type, field_length = field.type, field.length
|
||||||
if isinstance(field_type, SQLCustomType):
|
if isinstance(field_type, SQLCustomType):
|
||||||
|
|||||||
Reference in New Issue
Block a user