Hi,
I have some helper code in applications/myapp/modules/site_helpers.py.
I've been trying to cache the results of some of the functions there.
The current content is:
from gluon.shell import exec_environment
ee = exec_environment('applications/myapp/models/db.py')
cache = ee.cache
for use the global variables in modules the new recommended way is using
current object.
in models/***.py
from gluon import current
current.foo = bar
in modules/***.py
from gluon import *
foo = current.foo
# current already has session, request, response and T
http://zerp.ly/rochacbruno
Em
2 matches
Mail list logo