For modules shared among multiple applications, just make sure they are anywhere in sys.path (e.g., in the site-packages directory) -- they do not have to been in the modules folder of an application. If you want to keep the modules within a particular application, you can simply import them into other applications by specifying the full path:
from applications.otherapp.modules import mymodule Anthony On Saturday, June 18, 2016 at 8:47:42 AM UTC-4, 刘志军 wrote: > > Hello web2pyer, > > I have a big project that I divided it into several applications based on > the user roles. > Most of the code was written follow the model-less pattern that lots of > source file under modules directory. > the problem is some of the source files need to be used in different > applications, so I have to copy the file across the applications, but it > could not be synced when one of them was edited or changed. > Does someone can suggest some advice on how to share the source files > under modules directory? > > BTW: currently I am using git sub-module to manage all the modules in > three applications, but I won't like to share ALL the modules in each of > the application. > > Thank you! > > Zhijun > > Best, > Regards > -- 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.

