Skip to content
Myr

jqueryexample.py

This file

Path

examples/jqueryexample/jqueryexample.py

29 lines · 660 bytes · Python

Last changed by

revert copyright year to project startDavid Lordbefore adoption310fbfc

History of this file

Take it

The walk stopped after 200 commits: lines older than 82d7c49 point at it.

Merge pull request #1277 from iKevinY/doc-fixesMarkus Unterwaditzerbefore adoption82d7c49

lines 1–7why, one step back
1# -*- coding: utf-8 -*-
2"""3 jQuery Example4 ~~~~~~~~~~~~~~56 A simple application that shows how Flask and jQuery get along.7

revert copyright year to project startDavid Lordbefore adoption310fbfc

line 8why, one step back
8 :copyright: © 2010 by the Pallets team.

Merge pull request #1277 from iKevinY/doc-fixesMarkus Unterwaditzerbefore adoption82d7c49

lines 9–10why, one step back
9 :license: BSD, see LICENSE for more details.
10"""

revert copyright year to project startDavid Lordbefore adoption310fbfc

line 11why, one step back
11

Merge pull request #1277 from iKevinY/doc-fixesMarkus Unterwaditzerbefore adoption82d7c49

lines 12–26why, one step back
12from flask import Flask, jsonify, render_template, request
13app = Flask(__name__)141516@app.route('/_add_numbers')17def add_numbers():18 """Add two numbers server side, ridiculous but well..."""19 a = request.args.get('a', 0, type=int)20 b = request.args.get('b', 0, type=int)21 return jsonify(result=a + b)222324@app.route('/')25def index():26 return render_template('index.html')

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 27–29why, one step back
27
28if __name__ == '__main__':29 app.run()