2024-08-24 12:14:18 +02:00
|
|
|
from flask import Flask, render_template
|
2024-08-24 13:21:02 +02:00
|
|
|
from markupsafe import escape
|
2024-08-24 12:14:18 +02:00
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
2024-09-04 11:35:18 +02:00
|
|
|
api_url = "https://api.toddlershop.yarnecoppens.com"
|
2024-09-04 10:07:55 +02:00
|
|
|
|
2024-08-24 12:14:18 +02:00
|
|
|
@app.route("/")
|
2024-08-24 12:28:56 +02:00
|
|
|
def start():
|
2024-09-04 10:07:55 +02:00
|
|
|
return render_template('index.jinja', api_url=api_url)
|
2024-08-24 12:28:56 +02:00
|
|
|
|
2024-08-24 13:21:02 +02:00
|
|
|
@app.route("/pay_cash/<price>")
|
|
|
|
|
def pay_cash(price: int):
|
2024-09-04 10:07:55 +02:00
|
|
|
return render_template('paycash.jinja', price=escape(price), api_url=api_url)
|
2024-09-04 11:34:22 +02:00
|
|
|
|
|
|
|
|
@app.route("/pay_card/<price>")
|
|
|
|
|
def pay_card(price: int):
|
|
|
|
|
return render_template('paycard.jinja', price=escape(price), api_url=api_url)
|