On 18 Jul 2013, at 8:32 AM, Massimo Di Pierro <massimo.dipie...@gmail.com> 
wrote:
> It is safe if used as current is intended to be used (within functions called 
> within the same thread).
> 
> This is not done by default because you may have
> 
> 
> db1 = DAL(....)
> db2 = DAL(....)
> my_other_db = DAL(....)
> etc.

Well, and also to be used in gluon, since there's no real motivation to use it 
in an application.

> 
> On Thursday, 18 July 2013 09:49:42 UTC-5, Richard wrote:
> Hello,
> 
> Is it safe to do :
> 
> from gluon import current
> current.db = db
> 
> And if so, why is db not already available in current by default?
> 
> Thanks
> 
> Richard
> 
> -- 
>  



-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to