title: from app import app ImportError: cannot import name 'app'
body: <p>flask-mega-tutorial and I found some error when I execute my code.
  first I have <em>init</em>.py</p>
  
  <pre><code>from flask import Flask
  
  app = Flask(__name__)
  
  from app import routes
  </code></pre>
  
  <p>then routes.py</p>
  
  <pre><code>from app import app
  
  @app.route('/')
  @app.route('/index')
  def index():
      return "Hello, World!"
  </code></pre>
  
  <p>And last I have microblog.py to execute my code</p>
  
  <pre><code>from app import app
  
  app.run(debug=True)
  </code></pre>
  
  <p>but when I execute FLASK_APP = microblog.py then flask run, I found this </p>
  
  <blockquote>
    <ul>
    <li>Serving Flask app "microblog.py"</li>
    <li>Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead.</li>
    <li>Debug mode: off Usage: flask run [OPTIONS]</li>
    </ul>
    
    <p>Error: While importing "microblog", an ImportError was raised:</p>
    
    <p>Traceback (most recent call last):   File
    "e:\skripsiku\flask\lib\site-packages\flask\cli.py", line 235, in
    locate_app <strong>import</strong>(module_name) File "E:\skripsiku\microblog.py",
    line 1, in  from app import app ImportError: cannot import
    name 'app'</p>
  </blockquote>
  
  <p>Oh and lastly there is my folder structure. I have main folder named skripsiku then in there I have app folder (in : init.py, routes.py) and microblog.py. Can anyone help me? thank you</p>