title: deploying flask app with uwsgi and flask-script Manager
body: <p>Traditionally, I have configured the UWSGI configuration file to call an application like below:</p>
  
  <pre><code>mydirectory/uwsgi_application.ini
  ...
  #python module to import
  app = run_web
  module = %(app)
  callable = app
  ...
  </code></pre>
  
  <p>, </p>
  
  <pre><code>mydirectory/run_web.py
  from ersapp import app
  if __name__ == "__main__":
      app.run()
  </code></pre>
  
  <p>,</p>
  
  <pre><code>mydirectory/ersapp/__init__.py
  ...
  app = Flask('ersapp')
  ...
  </code></pre>
  
  <p>But now, I am following Miguel Grinberg's Flask book and here he uses an application factory like below</p>
  
  <pre><code>mydirectory/ersapp/__init__.py
  ...
  def create_app(config_name):
      webapp = Flask(__name__)
      ...
      return webapp
  </code></pre>
  
  <p>with a "manager" (see <a href="http://flask-script.readthedocs.org/en/latest/" rel="noreferrer">flask-script Manager</a>)</p>
  
  <pre><code>mydirectory/manage.py
  from webapp import create_app
  ...
  webapp = create_app(os.getenv('FLASK_CONFIG') or 'default')
  manager = Manager(webapp)
  ...
  if __name__ == '__main__':
      manager.run()
  </code></pre>
  
  <p>In this configuration, I trigger my development server with <code>$ python manage.py runserver</code></p>
  
  <p>whereas before I triggered it with <code>$ python run_web.py</code></p>
  
  <p>Now, I am struggling with what to put in the uwsgi configuration file to allow this app to be deployed via UWSGI. Specifically, the <code>app</code>, <code>module</code>, and <code>callable</code> variables.</p>
  
  <p>The error I am getting in my logs is:</p>
  
  <pre><code>...
  --- no python application found, check your startup logs for errors ---
  ...
  </code></pre>