def add(): simpizza = Location() simpizza.configure("Sim-pizza", "De Pintelaan 252 9000 Gent, tel: 09/321.02.00", "http://simpizza.be") db.session.add(simpizza) for pizza in pizzas: entry = Product() entry.configure(simpizza, pizza, 1195) db.session.add(entry)
def addTA(): primadonna_takeaway = Location() primadonna_takeaway.configure( "Primadonna (takeaway laten bezorgen)", "Overpoortstraat 46 9000 Gent, tel: 0475 40 13 00", "https://www.takeaway.com/be-en/prima-donna") db.session.add(primadonna_takeaway) for pizza, price in pizzasTA.items(): entry = Product() entry.configure(primadonna_takeaway, pizza, price) db.session.add(entry)
def addAfhalen(): primadonna_afhalen = Location() primadonna_afhalen.configure( "Primadonna (bellen en afhalen)", "Overpoortstraat 46 9000 Gent, tel: 0475 40 13 00", "http://primadonnagent.be/Menu.html") db.session.add(primadonna_afhalen) for pizza, price in pizzasAfhalen.items(): entry = Product() entry.configure(primadonna_afhalen, pizza, price) db.session.add(entry)
def add() -> None: "Add Fitchen to the database" fitchen = Location() fitchen.configure("Fitchen", "?", "?", "https://www.fitchen.be/") db.session.add(fitchen) 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(fitchen, name, price) db.session.add(entry)
def add() -> None: testlocation = Location() testlocation.configure( "Testlocation", "Please ignore!", "0469 69 69 69", "http://localhost:8000/", ) db.session.add(testlocation) for stuff in STUFFS: entry = Product() entry.configure(testlocation, *stuff) db.session.add(entry)
def add() -> None: "Add Simpizza to the database" simpizza = Location() simpizza.configure( "Sim-pizza", "De Pintelaan 252 9000 Gent", "tel: 09/321.02.00", "http://simpizza.be", ) db.session.add(simpizza) for pizza in pizzas: entry = Product() entry.configure(simpizza, pizza, 1195) db.session.add(entry)
def addAfhalen() -> None: "Add Primadonna to takeaway to the database" primadonna_afhalen = Location() primadonna_afhalen.configure( "Primadonna (bellen en afhalen)", "Overpoortstraat 46 9000 Gent", "tel: 0475 40 13 00", "http://primadonnagent.be/Menu.html", ) db.session.add(primadonna_afhalen) for pizza, price in pizzasAfhalen.items(): entry = Product() entry.configure(primadonna_afhalen, pizza, price) db.session.add(entry)
def add() -> None: "Add Stefanos to the database" stefanos = Location() stefanos.configure( "Stefano's Place", "Overpoortstraat 12 9000 Gent", "tel: geen", "https://www.facebook.com/pages/category/Fast-Food-Restaurant/Stefanos-Place-370774480004139/", # pylint: disable=C0301 ) db.session.add(stefanos) # sommige bickies kunde met een schel kaas bestellen for name, price in bickies.items(): bicky = Product() bicky.configure(stefanos, name, price) db.session.add(bicky) bicky_cheese = Product() bicky_cheese.configure(stefanos, name + " cheese", price + 30) db.session.add(bicky_cheese) for dictionary in data: for name, price in dictionary.items(): item = Product() item.configure(stefanos, name, price) db.session.add(item) # saus in een potteke bestellen is 10 cent extra for name, price in sauskes.items(): saus = Product() saus.configure(stefanos, name, price) db.session.add(saus) saus_apart = Product() saus_apart.configure(stefanos, name + " apart", price + 10) db.session.add(saus_apart)
def chinees_create_entry(name) -> None: entry = Product() entry.configure(chinees, name, 550) db.session.add(entry)