look for dal in packages by default

This commit is contained in:
mdipierro
2016-07-05 08:35:42 -05:00
parent d9c2f778ee
commit c5bd7ca25d
4 changed files with 5 additions and 8 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ __all__ = ['A', 'B', 'BEAUTIFY', 'BODY', 'BR', 'CAT', 'CENTER', 'CLEANUP', 'CODE
import os
import sys
try:
sys.path.append(os.path.join(
os.path.dirname(os.path.abspath(__file__)), "packages", "dal"))
sys.path.insert(1,os.path.join(
os.path.dirname(os.path.abspath(__file__)), "packages", "dal"))
import pydal
sys.modules['pydal'] = pydal
except ImportError:
+2 -4
View File
@@ -26,8 +26,7 @@ def api():
'DELETE':{'query':None},
},
}
return Collection(db).process(request,response,policies)
return Collection(db).process(request, response, policies)
"""
__all__ = ['Collection']
@@ -226,8 +225,7 @@ class Collection(object):
id = row.id
for name in ('slug','fullname','title','name'):
if name in row:
href = URL(args=(tablename,id,IS_SLUG.urlify(row[name] or '')),
scheme=True)
href = URL(args=(tablename,id),scheme=True)
break
else:
href = URL(args=(tablename,id),scheme=True)
-1
View File
@@ -15,7 +15,6 @@ from pydal import Field
from pydal.objects import Row, Rows, Table, Query, Set, Expression
from pydal import SQLCustomType, geoPoint, geoLine, geoPolygon
def _default_validators(db, field):
"""
Field type validation, using web2py's validators mechanism.