views.py
This file
Path
examples/javascript/js_example/views.py
18 lines · 440 bytes · Python
Last changed by
apply pyupgradeDavid Lordbefore adoption524fd0b
History of this fileTake it
The walk stopped after 200 commits: lines older than e102e5c 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 requestMerge pull request #2707 from rochacbruno/lazy_loader_messageDavid Lordbefore adoptione102e5c
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>")Merge pull request #2707 from rochacbruno/lazy_loader_messageDavid Lordbefore adoptione102e5c
line 10why, one step back10def index(js):apply pyupgradeDavid Lordbefore adoption524fd0b
line 11why, one step back11 return render_template(f"{js}.html", js=js)Merge pull request #2707 from rochacbruno/lazy_loader_messageDavid Lordbefore adoptione102e5c
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"])Merge pull request #2707 from rochacbruno/lazy_loader_messageDavid Lordbefore adoptione102e5c
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)Merge pull request #2707 from rochacbruno/lazy_loader_messageDavid Lordbefore adoptione102e5c
line 18why, one step back18 return jsonify(result=a + b)