Add minimal logging
This commit is contained in:
4
app.py
4
app.py
@@ -29,6 +29,7 @@ def index():
|
||||
wertfloat = float(wert)
|
||||
givenfloat = float(given)
|
||||
|
||||
# reset button
|
||||
if wertfloat == 0:
|
||||
global gesamtwert
|
||||
gesamtwert = 0
|
||||
@@ -40,12 +41,14 @@ def index():
|
||||
item4 = 0
|
||||
item5 = 0
|
||||
item6 = 0
|
||||
# summarize value
|
||||
elif wertfloat != -2:
|
||||
gesamtwert += wertfloat
|
||||
gesamtwert = round(gesamtwert, 2)
|
||||
if gesamtwert > 0:
|
||||
sum = str(gesamtwert) + "0"
|
||||
|
||||
# summarize items
|
||||
if wertfloat == 5.8:
|
||||
item1 += 1
|
||||
if wertfloat == 4.8:
|
||||
@@ -62,6 +65,7 @@ def index():
|
||||
gesamtwert = session['summefloat']
|
||||
sum = str(gesamtwert) + "0"
|
||||
change = str(round((givenfloat - gesamtwert) * -1, 2)) + "0"
|
||||
logging.info('Sum %s, given %s, change %s', sum, givenfloat, change)
|
||||
|
||||
session['item1'] = item1
|
||||
session['item2'] = item2
|
||||
|
Reference in New Issue
Block a user