Applicazione base con Flask
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
381 B

from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('modulo.html')
@app.route('/area_rettangolo', methods=['POST'])
def rectarea():
area = int(request.form['base']) * int(request.form['altezza'])
return render_template('area.html', area_calcolata=area)
if __name__ == '__main__':
app.run()