Flacon render_template() pour retourner “NameError: name 'app' n'est pas défini”

Je suis le Guide de Démarrage rapide pour Flacon. http://flask.pocoo.org/docs/quickstart/#static-files
J'obtiens cette erreur que j'ai suivi le guide.

/application
/__init__.py
/templates
    /hello.html

   @app.route('/hello/')
   @app.route('/hello/<name>')
   def hello(name=None):
       return render_template('hello.html', name=name)

    >python _init_.py 
        Traceback (most recent call last):
        File "_init_.py", line 4, in <module>
   @app.route('/hello/')
   NameError: name 'app' is not defined
vous avez juste besoin d'importer le render_template. from flask import Flask, render_template

OriginalL'auteur ronyswag | 2012-05-30