copiando o flaskr de https://github.com/mitsuhiko/flask/tree/master/examples/flaskr