def get(self,resource): import urllib mbid=str(urllib.unquote(resource)) key=ndb.Key("Artist",mbid) artist=key.get() logging.error(artist) if artist is None: artist=Artist(key=key) name=artist.getName() self.renderFront(artists=memcache.get("lastfm topArtists"), genres=memcache.get("lastfm topTags"), playlist={"tipo":"artist","data":{"mbid":mbid, "name":name}}) else: artista=artist.toJson() logging.error(artista) name=artist.name self.renderFront(artists=memcache.get("lastfm topArtists"), genres=memcache.get("lastfm topTags"), playlist={"tipo":"artist","data":{"mbid":mbid, "name":name}}, artist=artista)