I using the same process as Auth, all my shared code is put in a package at
the same level as gluon and I import what I need when I need it passing the
db object to the constructor.

On Thu, Jun 7, 2012 at 4:29 PM, Anthony <abasta...@gmail.com> wrote:

> - Pass it in when you initialize the class
>>
>
> This is how Auth and Crud work:
> http://code.google.com/p/web2py/source/browse/gluon/tools.py#898,
> http://code.google.com/p/web2py/source/browse/gluon/tools.py#3056.
> Probably the best approach when you need to access db from multiple methods.
>
> Anthony
>
>



-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com

Reply via email to