I'm trying to run flask on a server with passenger. This is my passenger_wsgi.py file:
import sys, os
INTERP = os.path.join(os.environ['HOME'], 'flask_env', 'bin', 'python')
if sys.executable != INTERP:
os.execl(INTERP, INTERP, *sys.argv)
sys.path.append(os.getcwd())
from wtf import app as application
# Uncomment next two lines to enable debugging
from werkzeug.debug import DebuggedApplication
application = DebuggedApplication(application, evalex=True)
There is an app.py file under wtf folder. There is also __init__.py
in there so python recognizes it as a module directory. However it gives me this error:
Traceback (most recent call last)
File "/home/hiepha19/flask_env/lib/python2.6/site-packages/werkzeug/debug/__init__.py", line 88, in debug_application
app_iter = self.app(environ, start_response)
TypeError: 'module' object is not callable