Cambio nomi di funzione.

This commit is contained in:
Emiliano Vavassori 2020-04-24 01:36:37 +02:00
parent 851c030c2b
commit c72753d2d5

4
app.py
View File

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