On Thursday, August 18, 2011 10:09:26 AM UTC-4, Carlos wrote: > > > now = request.now > from gluon import current > # assign any object(s) to current to be shared/accessed via the extended > methods. > current.now = now > Be careful about this -- I don't think we have finalized the namespace conventions for the 'current' object yet (i.e., it's possible that in the future the framework will use current.now for its own purpose, so this code would end up overwriting that). I think there was talk about setting aside something like 'current.app' for use by the application code. I suppose we should figure out something more definitive soon. Anthony
- Re: [web2py] extend (add methods, not subclass) web2py c... Jonathan Lundell
- Re: [web2py] extend (add methods, not subclass) web... Carlos
- Re: [web2py] extend (add methods, not subclass)... pbreit
- [web2py] Re: extend (add methods, not subcl... Massimo Di Pierro
- [web2py] Re: extend (add methods, not s... pbreit
- [web2py] Re: extend (add methods, ... Massimo Di Pierro
- Re: [web2py] Re: extend (add m... Jonathan Lundell
- Re: [web2py] Re: extend (add m... Jonathan Lundell
- Re: [web2py] Re: extend (add m... Michele Comitini
- [web2py] Re: extend (add metho... Carlos
- [web2py] Re: extend (add metho... Anthony
- Re: [web2py] Re: extend (add m... Jonathan Lundell