From 08705ae44e4e7020b8f6e645da5c253b06859ddc Mon Sep 17 00:00:00 2001 From: elpatron68 Date: Mon, 27 May 2024 13:27:31 +0200 Subject: [PATCH] Rename var --- app.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index b152ec6..5eb73fd 100644 --- a/app.py +++ b/app.py @@ -6,8 +6,8 @@ from flask_bootstrap import Bootstrap app = Flask(__name__) app.config['SECRET_KEY'] = 'j69ol5mcHLsEtLg4Y/+myd9wWD4pp56E' -# set up logging -formatter = logging.Formatter( # pylint: disable=invalid-name +# setup logging +formatter = logging.Formatter( '%(asctime)s %(levelname)s %(process)d ---- %(threadName)s ' '%(module)s : %(funcName)s {%(pathname)s:%(lineno)d} %(message)s','%Y-%m-%dT%H:%M:%SZ') handler = logging.StreamHandler() @@ -18,7 +18,7 @@ app.logger.info('Starting erdbeerhannah v1.0.5') Bootstrap(app) -requestcounter = 0 +postcounter = 0 gesamtwert = 0 change = 0 givenfloat = 0 @@ -32,11 +32,11 @@ item6 = 0 @app.route("/", methods=["GET", "POST"]) def index(): - global gesamtwert, item1, item2, item3, item4, item5, item6, sum, givenfloat, change, given, background, requestcounter + global gesamtwert, item1, item2, item3, item4, item5, item6, sum, givenfloat, change, given, background, postcounter background = "bg-white" if request.method == "POST": - requestcounter += 1 + postcounter += 1 # wert = float(request.form["wert"]) wert = request.form.get('wert', "0", type=float) given = request.form.get('given', "0", type=float) @@ -101,7 +101,7 @@ def index(): session['given'] = givenfloat app.logger.info('*** sum %s, given %s, change %s', sum, givenfloat, change) - app.logger.info('*** requestcounter %s', requestcounter) + app.logger.info('*** postcounter %s', postcounter) return render_template("index.html", gesamtwert=session.get('summestring', 0), change=session.get('change', 0), @@ -126,4 +126,4 @@ def favicon(): # 'about.html') if __name__ == "__main__": - app.run(debug=True, host='0.0.0.0') \ No newline at end of file + app.run(debug=True, host='127.0.0.1') \ No newline at end of file