title: cannot import name "app" of a circular import issue
body: <p>I have suffered from some problems with my code for a some hours.</p>
  
  <p>I'm sure that it is caused by a circular import issue, but I have another question.</p>
  
  <p>I have two blueprint, auth and main. I just return a <code>render_template</code> without any data passing, and things all go good. But when I try to shwo something in my <code>main.index</code>, suddenly an error occured.</p>
  
  <p>I wonder why it works fine just in <code>auth.views</code> while there does have a circular import issue?</p>
  
  <p>my tree struct</p>
  
  <pre><code>app
    |- auth 
         |- __init__.py
         |- forms.py
         |- views.py
    |- main
         |- __init__.py
         |- forms.py
         |- views.py
    |- template
    |- __init__.py
    |- models.py
  config.py
  manage.py
  datta.sqlite
  </code></pre>
  
  <p>In <code>auth.__init__.py</code>:</p>
  
  <pre class="lang-py prettyprint-override"><code>from flask import Blueprint
  
  auth = Blueprint("auth", __name__)
  
  from . import views
  </code></pre>
  
  <p>and in auth.views.py</p>
  
  <pre><code>from app.auth import auth
  from app.models import *
  from manage import app
  
  
  @auth.route('/')
  def index():
      page = request.args.get("page", 1, type=int)
      articles = Article.query.order_by(Article.update_time.desc()).paginate(
          page, app.config["ARTICLES_PER_PAGE"], False)
  
      next_url = url_for('auth.index', page=articles.next_num if articles.has_next else None)
      prev_url = url_for('auth.index', page=articles.prev_num if articles.has_prev else None)
      return render_template('index.html', articles=articles.items,
                             next_url=next_url, prev_url=prev_url)
  </code></pre>
  
  <p>In <code>main.__init__.py</code>:</p>
  
  <pre class="lang-py prettyprint-override"><code>from flask import Blueprint
  
  main = Blueprint("main", __name__)
  
  from . import views
  
  </code></pre>
  
  <p>In <code>main.views.py</code>:</p>
  
  <pre class="lang-py prettyprint-override"><code>from app.main import main
  from app.models import *
  from manage import app
  
  @main.route('/')
  def index():
      page = request.args.get("page", 1, type=int)
      articles = Article.query.order_by(Article.update_time.desc()).paginate(
          page, app.config["ARTICLES_PER_PAGE"], False)
  
      next_url = url_for('main.index', page=articles.next_num if articles.has_next else None)
      prev_url = url_for('main.index', page=articles.prev_num if articles.has_prev else None)
      return render_template('index.html', articles=articles.items,
                             next_url=next_url, prev_url=prev_url)
  </code></pre>
  
  <p>In <code>app.__init__.py</code>:</p>
  
  <pre class="lang-py prettyprint-override"><code>def create_app():
      app = Flask(__name__)
      app.config.from_object(Config)
      Config.init_app(app)
      ...
      from app.main import main
      app.register_blueprint(main)
  
      from app.auth import auth
      app.register_blueprint(auth, url_prefix='/auth')
  
      return app
  </code></pre>
  
  <p>in manage.py</p>
  
  <pre><code>from flask_migrate import Migrate, MigrateCommand
  from flask_script import Manager, Shell
  
  from app import create_app, db
  from app.models import *
  
  app = create_app()
  manager = Manager(app)
  migrate = Migrate(app, db)
  manager.add_command('db', MigrateCommand)
  
  
  def make_shell_context():
      return dict(db=db, ArticleType=ArticleType, Source=Source,
                  Article=Article, User=User, Menu=Menu,
                  ArticleTypeSetting=ArticleTypeSetting)
  
  
  manager.add_command("shell", Shell(make_context=make_shell_context))
  manager.add_command("db", MigrateCommand)
  
  
  if __name__ == '__main__':
      app.run(debug=True)
  
  </code></pre>
  
  <p>And my traceback are as follow:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/bohn/Desktop/1pycharm workspace/BlogPoweredByFlask/manage.py", line 7, in &lt;module&gt;
      app = create_app()
    File "C:\Users\bohn\Desktop\1pycharm workspace\BlogPoweredByFlask\app\__init__.py", line 30, in create_app
      from app.main import main
    File "C:\Users\bohn\Desktop\1pycharm workspace\BlogPoweredByFlask\app\main\__init__.py", line 5, in &lt;module&gt;
      from . import views
    File "C:\Users\bohn\Desktop\1pycharm workspace\BlogPoweredByFlask\app\main\views.py", line 5, in &lt;module&gt;
      from manage import app
    File "C:\Users\bohn\Desktop\1pycharm workspace\BlogPoweredByFlask\manage.py", line 7, in &lt;module&gt;
      app = create_app()
    File "C:\Users\bohn\Desktop\1pycharm workspace\BlogPoweredByFlask\app\__init__.py", line 33, in create_app
      from app.auth import auth
    File "C:\Users\bohn\Desktop\1pycharm workspace\BlogPoweredByFlask\app\auth\__init__.py", line 5, in &lt;module&gt;
      from . import views
    File "C:\Users\bohn\Desktop\1pycharm workspace\BlogPoweredByFlask\app\auth\views.py", line 9, in &lt;module&gt;
      from manage import app
  ImportError: cannot import name 'app'
  </code></pre>