On Sat, Jan 14, 2012 at 6:21 PM, Massimo Di Pierro < [email protected]> wrote:
> eventually we shoud have a way to remap table and field names that was > one of the main reason for rewriting the dal. > > This is good because without remapping apps cannot share the same database (ie common-named tables, >1 instance of the same app, etc). When can we expect this, is it low priority? I was thinking about writing a patch few months ago but plans got lost in my schedule. On Mon, Jan 16, 2012 at 5:56 PM, Marcello <[email protected]> wrote: > Would be great.... > > This solution works great... but it's not accessible in the modules > files, because dog is not visible there... > > You can pass everything into modules using current object. In controller: current.db = db in module from gluon import current def module_function(): db = current.db don't do it as global, it should be inside some "module_function" bacause it has to be executed for every request. Marin

