|
local_import_aux(name,
force=True,
app=' welcome ' )
In apps, instead of importing a local module
(in applications/app/modules) with::
import a.b.c as d
you should do::
d = local_import('a.b.c')
or (to force a reload):
d = local_import('a.b.c', reload=True)
This prevents conflict between applications and un-necessary execs. |
source code
|
|
|
build_environment(request,
response,
session,
store_current=True)
Build the environment dictionary into which web2py files are
executed. |
source code
|
|
|
save_pyc(filename)
Bytecode compiles the file `filename` |
source code
|
|
|
read_pyc(filename)
Read the code inside a bytecode compiled file if the MAGIC number
is compatible |
source code
|
|
|
compile_views(folder)
Compiles all the views in the application specified by
`folder` |
source code
|
|
|
compile_models(folder)
Compiles all the models in the application specified by
`folder` |
source code
|
|
|
compile_controllers(folder)
Compiles all the controllers in the application specified by
`folder` |
source code
|
|
|
run_models_in(environment)
Runs all models (in the app specified by the current folder) It
tries pre-compiled models first before compiling them. |
source code
|
|
|
run_controller_in(controller,
function,
environment)
Runs the controller.function() (for the app specified by the
current folder). |
source code
|
|
|
|
|
remove_compiled_application(folder)
Deletes the folder `compiled` containing the compiled
application. |
source code
|
|
|
compile_application(folder)
Compiles all models, views, controller for the application in
`folder`. |
source code
|
|
|
|