you cant assign db to current. you need to pass db to you class __init__ http://zerp.ly/rochacbruno Em 05/12/2011 23:21, "Francisco Costa" <m...@franciscocosta.com> escreveu:
> thanks Anthony, but how can I have access to db in modules then? > > On Dec 6, 1:14 am, Anthony <abasta...@gmail.com> wrote: > > Read the callout box at the end of this > > section: > http://web2py.com/book/default/chapter/04#Accessing-the-API-from-Pyth.... > > You're not supposed to assign items from 'current' to global variables > > within the module, which are defined only once when the module is first > > imported. > > > > Anthony >