Flask Cheatsheet

Sections Simple Flask example Package Management Resources home Master CheatSheet Index Simple Flask example + from flask import Flask, render_template app = Flask(__name__) months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] @app.route('/') def index(): return render_template('index.html', city='Portland, OR', months=months) if __name__ == '__main__': app.run(debug=True) Install a python package pip install ansible