Add Fitchen script

This commit is contained in:
redfast00 2019-06-28 18:57:41 +02:00
parent 0cce93b576
commit 87903a6d4a
No known key found for this signature in database
GPG key ID: 5946E0E34FD0553C
2 changed files with 46 additions and 2 deletions

View file

@ -0,0 +1,37 @@
from models import Location, Product
from app import db
menuitems = [
'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'
]
pricedict = {'Small': 799, 'Medium': 999, 'Large': 1199}
def add():
simpizza = Location()
simpizza.configure("Fitchen", "?", "?", "https://www.fitchen.be/")
db.session.add(simpizza)
for menuitem in menuitems:
for size, price in pricedict.items():
for container in ['bowl', 'wrap']:
name = '%s %s in %s' % (size, menuitem, container)
entry = Product()
entry.configure(simpizza, name, price)
db.session.add(entry)

View file

@ -1,8 +1,15 @@
from app import db from app import db
import add_oceans_garden, add_admins, add_simpizza, add_primadonna import add_oceans_garden, add_admins, add_simpizza, add_primadonna, add_fitchen
entry_sets = {"Admins": add_admins.add, "Ocean's Garden": add_oceans_garden.add, "SimPizza": add_simpizza.add, "Primadonna": add_primadonna.add} entry_sets = {
"Admins": add_admins.add,
"Ocean's Garden": add_oceans_garden.add,
"SimPizza": add_simpizza.add,
"Primadonna": add_primadonna.add,
"Fitchen": add_fitchen.add
}
yes = ["yes", "y", "Y"] yes = ["yes", "y", "Y"]
no = ["no", "n", "N"] no = ["no", "n", "N"]