From 50a262e5492238d11bfabb0fe56369ebd5ede70b Mon Sep 17 00:00:00 2001 From: Yarne Coppens Date: Wed, 4 Sep 2024 10:07:55 +0200 Subject: [PATCH] Made api_url a variable --- app.py | 6 ++++-- templates/index.jinja | 6 +++--- templates/paycash.jinja | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app.py b/app.py index 7566248..b59c1e2 100644 --- a/app.py +++ b/app.py @@ -3,10 +3,12 @@ from markupsafe import escape app = Flask(__name__) +api_url = "http://192.168.1.3:8000" + @app.route("/") def start(): - return render_template('index.jinja') + return render_template('index.jinja', api_url=api_url) @app.route("/pay_cash/") def pay_cash(price: int): - return render_template('paycash.jinja', price=escape(price)) + return render_template('paycash.jinja', price=escape(price), api_url=api_url) diff --git a/templates/index.jinja b/templates/index.jinja index de4c69f..d83503d 100644 --- a/templates/index.jinja +++ b/templates/index.jinja @@ -68,7 +68,7 @@
- +

€ 0

@@ -79,12 +79,12 @@
- +
- +
diff --git a/templates/paycash.jinja b/templates/paycash.jinja index b62790b..13c7605 100644 --- a/templates/paycash.jinja +++ b/templates/paycash.jinja @@ -15,7 +15,7 @@
- +
@@ -23,7 +23,7 @@
- +

€ {{price}}

@@ -34,7 +34,7 @@
- +