title: Importing Flask app when using app factory and flask script
body: <p>This is Flask app context</p>
  
  <pre><code>app = Flask(__name__)
  
  with app.app_context():
      # insert code here
  </code></pre>
  
  <p>Most of the use cases of app context involves having 'app' initialized on the same script or importing app from the base.</p>
  
  <p>My application is structured as the following:</p>
  
  <pre><code># application/__init__.py
  def create_app(config):
      app = Flask(__name__)
      return app
  
  # manage.py
  from application import create_app
  from flask_script import Manager
  
  manager = Manager(create_app)
  manager.add_command("debug", Server(host='0.0.0.0', port=7777))
  </code></pre>
  
  <p>This might be really trivial issue, but how I should call 'with app.app_context()' if my application is structured like this?</p>