def row_special(self, row): self.write("<td>") artists = json.loads(row['artist_parseable']) for artist in artists: self.write("%s" % artist['name']) if artist != artists[-1]: self.write(", ") self.write("</td>") self.write("<td>%s</td>" % row['rating']) if 'rating_user' in row: self.write("<td>%s</td>" % (row['rating_user'] or '')) self.write("<td>%s</td>" % pretty_date(row['song_played_at']))
def row_special(self, row): self.write("<td>") artists = json.loads(row["artist_parseable"]) for artist in artists: self.write("%s" % artist["name"]) if artist != artists[-1]: self.write(", ") self.write("</td>") self.write("<td>%s</td>" % row["rating"]) if "rating_user" in row: self.write("<td>%s</td>" % (row["rating_user"] or "")) self.write("<td>%s</td>" % pretty_date(row["song_played_at"]))