The only way is if you pass the dal instance as an argument to your
function calls.

do_something(db)

a_class = MyClass(db, request, response)

--
Thadeus





On Tue, Aug 3, 2010 at 6:04 PM, sethford <sethfor...@gmail.com> wrote:
> Is there is a way to access the db from a module? I know you can
> import the DAL from looking at:
>
> http://groups.google.com/group/web2py/browse_thread/thread/a78a04016d0dd737/d0e4792976294ec6?show_docid=d0e4792976294ec6
>
> but it appears this only works to create a new db altogether and I
> would like to have access to the same db I use in my controllers. Am I
> just doing this wrong or is there another way to do it?
>

Reply via email to