2019-09-09 23:19:21 +02:00
|
|
|
"Script to add Fitchen to Haldis"
|
2019-06-28 18:57:41 +02:00
|
|
|
from app import db
|
2019-09-08 02:02:16 +02:00
|
|
|
from models import Location, Product
|
2019-06-28 18:57:41 +02:00
|
|
|
|
|
|
|
menuitems = [
|
2019-09-05 03:33:29 +02:00
|
|
|
"Spicy Chicken",
|
|
|
|
"Advocado Chick",
|
|
|
|
"Indian Summer",
|
|
|
|
"Olive Garden",
|
|
|
|
"Advocado Spring",
|
|
|
|
"Spicy Mexican",
|
|
|
|
"Beefcake",
|
|
|
|
"Iron Man",
|
|
|
|
"Fitalian",
|
|
|
|
"Captain",
|
|
|
|
"Sea Breeze",
|
|
|
|
"Vegan Market",
|
|
|
|
"Sunset Beach",
|
|
|
|
"Hot Tofu",
|
|
|
|
"Vegan Advocado Spring",
|
2019-06-28 18:57:41 +02:00
|
|
|
]
|
|
|
|
|
2019-09-05 03:33:29 +02:00
|
|
|
pricedict = {"Small": 799, "Medium": 999, "Large": 1199}
|
2019-06-28 18:57:41 +02:00
|
|
|
|
|
|
|
|
2019-09-07 15:05:24 +02:00
|
|
|
def add() -> None:
|
2019-09-09 23:19:21 +02:00
|
|
|
"Add Fitchen to the database"
|
|
|
|
fitchen = Location()
|
|
|
|
fitchen.configure("Fitchen", "?", "?", "https://www.fitchen.be/")
|
|
|
|
db.session.add(fitchen)
|
2019-06-28 18:57:41 +02:00
|
|
|
|
|
|
|
for menuitem in menuitems:
|
|
|
|
for size, price in pricedict.items():
|
2019-09-05 03:33:29 +02:00
|
|
|
for container in ["bowl", "wrap"]:
|
|
|
|
name = "%s %s in %s" % (size, menuitem, container)
|
2019-06-28 18:57:41 +02:00
|
|
|
entry = Product()
|
2019-09-09 23:19:21 +02:00
|
|
|
entry.configure(fitchen, name, price)
|
2019-06-28 18:57:41 +02:00
|
|
|
db.session.add(entry)
|