Example #1
0
def showRestaurantsXML(): 
    restaurants = db.getAllRestaurants()

    xml = Element('restaurants')
    for restaurant in restaurants:
        xml.append(restaurant.serialize_xml)

    return xmlResponse(xml)
Example #2
0
def showRestaurantsXML():
    restaurants = db.getAllRestaurants()

    xml = Element('restaurants')
    for restaurant in restaurants:
        xml.append(restaurant.serialize_xml)

    return xmlResponse(xml)
Example #3
0
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'])
Example #4
0
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] )
Example #6
0
def showRestaurantsJSON():
    restaurants = db.getAllRestaurants()
    return jsonify(
        restaurants=[restaurant.serialize_json for restaurant in restaurants])