Added modular DAL, updated gluon imports to new structure

This commit is contained in:
gi0baro
2014-09-03 12:48:03 +02:00
parent d73c668f2d
commit 5e5e649c28
43 changed files with 11577 additions and 11686 deletions
+4 -4
View File
@@ -22,7 +22,7 @@ import decimal
import unicodedata
from cStringIO import StringIO
from gluon.utils import simple_hash, web2py_uuid, DIGEST_ALG_BY_SIZE
from gluon.dal import FieldVirtual, FieldMethod
from gluon.dal.objects import FieldVirtual, FieldMethod
regex_isint = re.compile('^[+-]?\d+$')
@@ -502,7 +502,7 @@ class IS_IN_DB(Validator):
sort=False,
_and=None,
):
from dal import Table
from dal.objects import Table
if isinstance(field, Table):
field = field._id
@@ -599,7 +599,7 @@ class IS_IN_DB(Validator):
if not [v for v in values if not v in self.theset]:
return (values, None)
else:
from dal import GoogleDatastoreAdapter
from dal.adapters import GoogleDatastoreAdapter
def count(values, s=self.dbset, f=field):
return s(f.belongs(map(int, values))).count()
@@ -644,7 +644,7 @@ class IS_NOT_IN_DB(Validator):
ignore_common_filters=False,
):
from dal import Table
from dal.objects import Table
if isinstance(field, Table):
field = field._id