views.py
This file
Path
examples/javascript/js_example/views.py
18 lines · 449 bytes · Python
Last changed by
Merge pull request #3246 from pallets/reorder-importsDavid Lordbefore adoption3db4697
History of this fileTake it
The walk stopped after 200 commits: lines older than 3a0ea72 point at it.
Merge pull request #3246 from pallets/reorder-importsDavid Lordbefore adoption3db4697
lines 1–3why, one step back1from flask import jsonify2from flask import render_template3from flask import requestmove coveragerc to setup.cfgDavid Lordbefore adoption3a0ea72
lines 4–7why, one step back45from js_example import app67Merge pull request #3183 from singingwolfboy/pre-commitDavid Baumgoldbefore adoption1dda032
lines 8–9why, one step back8@app.route("/", defaults={"js": "plain"})9@app.route("/<any(plain, jquery, fetch):js>")move coveragerc to setup.cfgDavid Lordbefore adoption3a0ea72
line 10why, one step back10def index(js):Merge pull request #3183 from singingwolfboy/pre-commitDavid Baumgoldbefore adoption1dda032
line 11why, one step back11 return render_template("{0}.html".format(js), js=js)move coveragerc to setup.cfgDavid Lordbefore adoption3a0ea72
lines 12–13why, one step back1213Merge pull request #3183 from singingwolfboy/pre-commitDavid Baumgoldbefore adoption1dda032
line 14why, one step back14@app.route("/add", methods=["POST"])move coveragerc to setup.cfgDavid Lordbefore adoption3a0ea72
line 15why, one step back15def add():Merge pull request #3183 from singingwolfboy/pre-commitDavid Baumgoldbefore adoption1dda032
lines 16–17why, one step back16 a = request.form.get("a", 0, type=float)17 b = request.form.get("b", 0, type=float)move coveragerc to setup.cfgDavid Lordbefore adoption3a0ea72
line 18why, one step back18 return jsonify(result=a + b)