Add Fitchen script
This commit is contained in:
parent
0cce93b576
commit
87903a6d4a
2 changed files with 46 additions and 2 deletions
37
app/database/add_fitchen.py
Normal file
37
app/database/add_fitchen.py
Normal 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)
|
|
@ -1,8 +1,15 @@
|
|||
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"]
|
||||
no = ["no", "n", "N"]
|
||||
|
||||
|
|
Loading…
Reference in a new issue