def showRestaurants(): # Get user info for the user menu user = userData.getCurrentUserInfo() # Fetch restaurants restaurants = db.getAllRestaurants() # Render template return render_template('restaurants.html', filesPath=filesHandler.getFilesFolder(), restaurants=list(restaurants), username=user['name'], user_id=user['id'], user_picture=user['picture'])
def showRestaurants(): # Get user info for the user menu user = userData.getCurrentUserInfo() # Fetch restaurants restaurants = db.getAllRestaurants() # Render template return render_template( 'restaurants.html', filesPath = filesHandler.getFilesFolder(), restaurants = list(restaurants), username = user['name'], user_id = user['id'], user_picture = user['picture'] )
def showmenu(restaurant_id): # Get user info for the user menu user = userData.getCurrentUserInfo() # Fetches the context restaurant restaurant = db.getRestaurant(restaurant_id) # Fetches all items from the context restaurant items = db.getAllRestaurantMenuItems(restaurant) # Fetches all courses type, and respective menu items courses = db.getAllRestItemsByCourses(restaurant) # Render template return render_template('menu.html', filesPath=filesHandler.getFilesFolder(), restaurant=restaurant, items=list(items), courses=courses, user_id=user['id'], username=user['name'], user_picture=user['picture'])
def showmenu(restaurant_id): # Get user info for the user menu user = userData.getCurrentUserInfo() # Fetches the context restaurant restaurant = db.getRestaurant( restaurant_id ) # Fetches all items from the context restaurant items = db.getAllRestaurantMenuItems( restaurant ) # Fetches all courses type, and respective menu items courses = db.getAllRestItemsByCourses( restaurant ) # Render template return render_template( 'menu.html', filesPath = filesHandler.getFilesFolder(), restaurant = restaurant, items = list(items), courses = courses, user_id = user['id'], username = user['name'], user_picture = user['picture'] )