different controllers aren't really meant to share. if you want something available to both controllers, put the code in models and be happy. Or you can go the "pythonic way" and put under modules (helpers.py), and then at the top of file_whatever.py you can use
from helpers import whatever On Saturday, June 6, 2015 at 5:26:39 AM UTC+2, [email protected] wrote: > > In rails you can do "require filename" and use anything from that file. > Can you do something similar in Web2py? > Here's the situation: > fila_a.py in Controllers > file_b.py in Controllers > > I need to import most of the functions (or all of them) from file_a.py > into file_b.py. > How can I achieve this? > > Thanks in advance :) > -- 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.

