Il giorno venerdì 4 novembre 2016 16:55:21 UTC+1, Anthony ha scritto: > > > You have two options. First, you can simply pass any web2py API or global > objects as arguments to functions or class constructors in your module. > Second, you can import the "current" object in your module. It includes the > request, response, session, cache, and T objects, and you can add your own > objects to it (such as db). You can also access any global objects via the > current.globalenv dictionary. This is discussed here: > http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules > > Anthony >
Perfect! I use the "current" object in function. Thanks Antony Fabio -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.