Ejemplo n.º 1
0
def make_show_objects(data):
    for i in range(0, len(data)):
        artist = find_or_create_artist(data[i]["artist"]["name"])
        date = data[i]["eventDate"]
        venue = data[i]["venue"]["name"]
        location = data[i]["venue"]["city"]["name"] + ", " + data[i]["venue"][
            "city"]["state"]
        # setlist = data[i]["sets"]
        setlist = []
        song_list = data[i]["sets"]["set"][0]["song"]
        for index in range(0, len(song_list)):
            setlist.append(song_list[index]["name"])
        Show(artist, date, venue, location, setlist)
    return Show.all()
 def shows(self):
     return[show for show in Show.all() if show.artist == self]
 def shows(self):
     return [show for show in Show.all() if self == show._artist]