removed circular import for validators
This commit is contained in:
2
VERSION
2
VERSION
@@ -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
|
||||
|
||||
10
gluon/dal.py
10
gluon/dal.py
@@ -234,12 +234,6 @@ except ImportError:
|
||||
except ImportError:
|
||||
simplejson = None
|
||||
|
||||
try:
|
||||
from gluon import validators
|
||||
have_validators = True
|
||||
except (ImportError, SyntaxError):
|
||||
have_validators = False
|
||||
|
||||
LOGGER = logging.getLogger("web2py.dal")
|
||||
DEFAULT = lambda:0
|
||||
|
||||
@@ -6872,7 +6866,9 @@ def sqlhtml_validators(field):
|
||||
fieldtype
|
||||
"""
|
||||
db = field.db
|
||||
if not have_validators:
|
||||
try:
|
||||
from gluon import validators
|
||||
except ImportError:
|
||||
return []
|
||||
field_type, field_length = field.type, field.length
|
||||
if isinstance(field_type, SQLCustomType):
|
||||
|
||||
Reference in New Issue
Block a user