title: Flask NameError: name 'app' is not defined
body: <p>I am new in python and use learn flask framework, I got error in some line of code</p>
  
  <p>please guide me:</p>
  
  <pre><code>from flask import redirect
  @app.route('/')
  def index():
     return redirect("http://www.google.com")
  </code></pre>
  
  <p>Error: </p>
  
  <pre><code>Traceback (most recent call last):
    File "redirect.py", line 2, in &lt;module&gt;
      @app.route('/')
  NameError: name 'app' is not defined
  </code></pre>
  
  <p>Thanks in advance</p>