Flask Jinja template



examples/flask/jinja-plain/app.py
from flask import Flask, request, render_template
app = Flask(__name__)

@app.route("/")
def main():
    return render_template('index.html')

@app.route("/echo", methods=['POST'])
def echo():
    user_text = request.form.get('text', '')
    return "You said: " + user_text

examples/flask/jinja-plain/templates/index.html
<form action="/echo" method="POST">
<input name="text">
<input type="submit" value="Echo">
</form>