Domyślna aplikacja Flask
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Flask'
Sleepy Sable
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Flask'
args = request.args
print (args) # For debugging
no1 = args['key1']
no2 = args['key2']
return jsonify(dict(data=[no1, no2])) # or whatever is required
from flask import url_for
# url_for(endpoint, **values)
url_for('static')
url_for('static', filename='js/index.js')