Added pyDAL from repository, adapted web2py code

This commit is contained in:
gi0baro
2014-12-15 20:13:40 +01:00
parent 5ea654ed06
commit dcadcf0ffb
43 changed files with 87 additions and 11692 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ from gluon.fileutils import mktree, listdir, read_file, write_file
from gluon.myregex import regex_expose, regex_longcomments
from gluon.languages import translator
from gluon.dal import DAL, Field
from gluon.dal.base import BaseAdapter
from gluon.pydal.base import BaseAdapter
from gluon.sqlhtml import SQLFORM, SQLTABLE
from gluon.cache import Cache
from gluon.globals import current, Response
@@ -407,7 +407,7 @@ def build_environment(request, response, session, store_current=True):
# Enable standard conditional models (i.e., /*.py, /[controller]/*.py, and
# /[controller]/[function]/*.py)
response.models_to_run = [
r'^\w+\.py$',
r'^\w+\.py$',
r'^%s/\w+\.py$' % request.controller,
r'^%s/%s/\w+\.py$' % (request.controller, request.function)
]
@@ -514,7 +514,7 @@ def compile_controllers(folder):
for function in exposed:
command = data + "\nresponse._vars=response._caller(%s)\n" % \
function
filename = pjoin(folder, 'compiled',
filename = pjoin(folder, 'compiled',
'controllers.%s.%s.py' % (fname[:-3],function))
write_file(filename, command)
save_pyc(filename)