On Wednesday, June 29, 2016 at 5:36:04 PM UTC-4, Julio F. Schwarzbeck wrote: > > Good to hear that Jim, are you by any chance using the current > <http://www.web2py.com/books/default/chapter/29/04/the-core?search=current.request#Sharing-the-global-scope-with-modules-using-the-current-object> > > object in your class to control state? - is this even advisable by the core > devs? >
If your controller code needs access to parts of the web2py environment, use of current is the recommended approach and should work. Note, current.globalenv is a dictionary containing the entire web2py global environment. Of course, you can instead explicitly pass the request, response, session, cache, and/or T objects to your code, and you can explicitly import other parts of the web2py API, such as HTML helpers, validators, etc. I think your approach should work -- you just need a way to route to your module code from either a model file or a standard controller. But there's no reason you can't keep most of your request handling code in modules. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.

