From c634b50ee936af7f715bdf282953481c809a03c0 Mon Sep 17 00:00:00 2001 From: Sachin Saxena Date: Thu, 4 Jan 2018 16:02:26 +0530 Subject: [PATCH] Duplicate function for restaurantMenu restaurantMenu Function definition occured twice --- Lesson-3/12_Edit-Menu-Form/project.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Lesson-3/12_Edit-Menu-Form/project.py b/Lesson-3/12_Edit-Menu-Form/project.py index 3dcdb86..82c45b6 100644 --- a/Lesson-3/12_Edit-Menu-Form/project.py +++ b/Lesson-3/12_Edit-Menu-Form/project.py @@ -13,22 +13,6 @@ @app.route('/') -def restaurantMenu(restaurant_id): - restaurant = session.query(Restaurant).first() - items = session.query(MenuItem).filter_by(restaurant_id=restaurant.id) - output = '' - for i in items: - output += i.name - output += '
' - output += i.price - output += '
' - output += i.description - output += '
' - output += '
' - - return output - - @app.route('/restaurants//') def restaurantMenu(restaurant_id): restaurant = session.query(Restaurant).filter_by(id=restaurant_id).one()