haldis/app/database/add_oceans_garden.py

55 lines
1.3 KiB
Python
Raw Normal View History

from models import Location, Product
from app import db
from itertools import product
zetmelen = ["Nasi", "Bami"]
vlezen = ["Rundsvlees", "Varkensvlees", "Kippenstukkjes"]
2019-09-05 03:33:29 +02:00
sauzen = [
"Balisaus",
"Yu siang saus",
"Gon boa saus",
"Curry saus",
"Oestersaus",
"Zwarte pepersaus",
"Champignons",
"Chinese champignons",
"A la Maleisïe",
]
specials = [
"Nasi Kippenbolletjes Zoetzuur",
"Bami Kippenbolletjes Zoetzuur",
"Nasi Varkenbolletjes Zoetzuur",
"Bami Varkenbolletjes Zoetzuur",
"Nasi Babi Pangang",
"Bami Babi Pangang",
"Diverse Groenten met Bami",
"Diverse Groenten met Nasi",
]
2019-09-07 15:05:24 +02:00
def add() -> None:
chinees = Location()
2019-09-05 03:33:29 +02:00
chinees.configure(
"Oceans's Garden",
"Zwijnaardsesteenweg 399 9000 Gent",
"tel: 09/222.72.74",
"http://oceangarden.byethost3.com/studentenmenus.html",
)
db.session.add(chinees)
2019-09-07 15:05:24 +02:00
def chinees_create_entry(name) -> None:
entry = Product()
entry.configure(chinees, name, 550)
db.session.add(entry)
2019-09-07 15:05:24 +02:00
def chinees_create_regulat(zetmeel, vlees="", saus="") -> None:
chinees_create_entry("{} {} {}".format(zetmeel, vlees, saus).rstrip())
for z, v, s in product(zetmelen, vlezen, sauzen):
chinees_create_regulat(z, v, s)
for special in specials:
2019-09-05 03:33:29 +02:00
chinees_create_entry(special)