Reputation: 1911
local_import function randomly does not import my modules from modules directory. The Error is:
ImportError: No module named testapp.modules.mymodule
I have this problem when i use web2py with apache (with wsgi). I have no problem when i run locally with "python web2py.py" command.
Any suggestion?
Upvotes: 2
Views: 675
Reputation: 1911
I will answer my own question :) I started using mod_proxy and everything is ok.
Upvotes: 1
Reputation: 25536
As of version 1.96.1, local_import()
has been deprecated. You should be able to do:
import mymodule
and it will look in your application's /modules folder before checking sys.path.
Upvotes: 1