diff --git a/app/database/add_oceans_garden.py b/app/database/add_oceans_garden.py index fcc063f..0111ec3 100644 --- a/app/database/add_oceans_garden.py +++ b/app/database/add_oceans_garden.py @@ -18,7 +18,7 @@ specials = ["Nasi Kippenbolletjes Zoetzuur", "Bami Kippenbolletjes Zoetzuur", def add(): chinees = Location() chinees.configure("Oceans's Garden", - "Zwijnaardsesteenweg 399 9000 Gent, tel: 09/222.72.74", + "Zwijnaardsesteenweg 399 9000 Gent", "tel: 09/222.72.74", "http://oceangarden.byethost3.com/studentenmenus.html") db.session.add(chinees) diff --git a/app/database/add_primadonna.py b/app/database/add_primadonna.py index 6b79e11..687db8f 100644 --- a/app/database/add_primadonna.py +++ b/app/database/add_primadonna.py @@ -45,7 +45,7 @@ pizzasTA = { 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") + 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(): @@ -93,7 +93,7 @@ pizzasAfhalen = { 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") + 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(): diff --git a/app/database/add_simpizza.py b/app/database/add_simpizza.py index 59bfb2e..e3fb7c8 100644 --- a/app/database/add_simpizza.py +++ b/app/database/add_simpizza.py @@ -11,7 +11,7 @@ pizzas = ['Bolognese de luxe', 'Hawaï', 'Popeye', 'Pepperoni', 'Seafood', 'Hot def add(): simpizza = Location() - simpizza.configure("Sim-pizza", "De Pintelaan 252 9000 Gent, tel: 09/321.02.00", "http://simpizza.be") + 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: diff --git a/app/models.py b/app/models.py index 2507e82..9e67f1d 100644 --- a/app/models.py +++ b/app/models.py @@ -50,10 +50,11 @@ class Location(db.Model): products = db.relationship('Product', backref='location', lazy='dynamic') orders = db.relationship('Order', backref='location', lazy='dynamic') - def configure(self, name, address, website): + def configure(self, name, address, telephone, website): self.name = name self.address = address self.website = website + self.telephone = telephone def __repr__(self): return '%s' % (self.name) diff --git a/app/static/css/map.css b/app/static/css/map.css new file mode 100644 index 0000000..eb42ff5 --- /dev/null +++ b/app/static/css/map.css @@ -0,0 +1,4 @@ +#mapid { + min-height: 400px; + height: 600px; +} \ No newline at end of file diff --git a/app/templates/layout.html b/app/templates/layout.html index 58862c7..56ca967 100644 --- a/app/templates/layout.html +++ b/app/templates/layout.html @@ -6,6 +6,7 @@ ('home', 'Home'), ('order_bp.orders', 'Orders'), ('locations', 'Locations'), + ('map', 'Map'), ('about', 'About'), ('stats', 'Stats'), ] -%} diff --git a/app/templates/locations.html b/app/templates/locations.html index 874cf36..3e78b30 100644 --- a/app/templates/locations.html +++ b/app/templates/locations.html @@ -15,7 +15,7 @@ {% for loc in locations -%}