Release v1.0

This commit is contained in:
2026-01-15 15:34:34 +01:00
parent bd7b1d2533
commit 002da8f77f

View File

@@ -4,6 +4,9 @@ import math
app = Flask(__name__)
# DEFINIZIONE VERSIONE (Modifica qui per i rilasci futuri)
VERSIONE = "Rev.1.0"
def calcola(d):
try:
def to_m(v, u):
@@ -46,14 +49,14 @@ def calcola(d):
def index():
res = None
if request.method == 'POST': res = calcola(request.form)
return render_template('index.html', res=res, form=request.form)
# Passiamo la variabile 'rev' al template HTML
return render_template('index.html', res=res, form=request.form, rev=VERSIONE)
@app.route('/download', methods=['POST'])
def download():
# Costruzione del file TXT con tutti i parametri e i risultati
f = request.form
report = f"""-------------------------------------------
REPORT TECNICO CALCOLO CEMENTO
REPORT TECNICO CALCOLO CEMENTO
-------------------------------------------
PARAMETRI DI INPUT:
@@ -82,7 +85,7 @@ DOSAGGIO PER SINGOLO CARICO ({f.get('res_nc')} carichi):
- Acqua: {f.get('res_bc_aq')} L
-------------------------------------------
Generato da Software Cemento Rev.0
Generato da Software Cemento {VERSIONE}
-------------------------------------------"""
return Response(report, mimetype="text/plain", headers={"Content-disposition":"attachment;filename=Report_Dettagliato.txt"})