Show some code.

On Tuesday, July 30, 2013 11:19:49 PM UTC-4, Mark Finkelstein wrote:
>
> I've been using current to access the db in my modules, but I would like 
> to modularize my modules a bit so that I don't rely as much on current. I 
> was wondering why db seems to not be accessible from the modules when 
> passed by a caller and saved through the init statement. In other words, if 
> I were to call Module(db) or as in Auth(db), it seems that if the module 
> isnt able to commit to the db. Auth clearly is able to do this, and I 
> believe I am following the Auth as an example well enough, but I thought 
> there might be some peculiarities to modules that I am not aware of as 
> clearly auth accesses the environment in a special way as well. I dont 
> think there should be a difference between using self.db or current.db; but 
> I may be mistaken? It seems when I change current.db to self.db, that is 
> when problems arise.
>
> Thank you in advance!
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to