Hey everyone,
I could use a sanity check here from the community.
In a controller I get a record, then, I want to pass do some database calls from a module.
It seems that the least code I could write would be in models:
from gluon import current
current.db = db
Then in the module at the top
from gluon import current
db = current.db
The method I was using was passing the objects in directly to the function defined in the module, but that was overly repetitive. No classes, just functions.
Can anyone see where I would run into problems? Is this thread safe?
Would it be better to instantiate a class with the handler similar to what I've seen elsewhere regarding model-less apps?
Thanks in advance!
-Mark