title: flask and passenger "TypeError: 'module' object is not callable"
body: <p>I'm trying to run flask on a server with passenger. This is my passenger_wsgi.py file:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>There is an app.py file under wtf folder. There is also <code>__init__.py</code> in there so python recognizes it as a module directory. However it gives me this error:</p>
  
  <pre><code>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
  </code></pre>