def showRestaurantsXML(): restaurants = db.getAllRestaurants() xml = Element('restaurants') for restaurant in restaurants: xml.append(restaurant.serialize_xml) return xmlResponse(xml)
def showRestaurantsXML(): restaurants = db.getAllRestaurants() xml = Element('restaurants') for restaurant in restaurants: xml.append(restaurant.serialize_xml) return xmlResponse(xml)
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 showRestaurantsJSON(): restaurants = db.getAllRestaurants() return jsonify( restaurants=[restaurant.serialize_json for restaurant in restaurants] )
def showRestaurantsJSON(): restaurants = db.getAllRestaurants() return jsonify( restaurants=[restaurant.serialize_json for restaurant in restaurants])