Copied Chris' code to get genre graph working

This commit is contained in:
2018-11-07 00:14:45 -05:00
parent d15717490d
commit df62fc21ee
4 changed files with 4 additions and 16 deletions

View File

@@ -211,7 +211,7 @@ def get_artist_data(request, user_secret):
filter=Q(track__users=user)))
processed_artist_counts = [{'name': artist.name, 'num_songs': artist.num_songs}
for artist in artist_counts]
pprint.pprint(processed_artist_counts)
pprint(processed_artist_counts)
return JsonResponse(data=processed_artist_counts, safe=False)
# }}} get_artist_data #
@@ -257,7 +257,7 @@ def get_genre_data(request, user_secret):
genre_dict['artists'] = get_artists_in_genre(user, genre_dict['genre'],
genre_dict['num_songs'])
print("*** Genre Breakdown ***")
pprint.pprint(list(genre_counts))
pprint(list(genre_counts))
return JsonResponse(data=list(genre_counts), safe=False)
# }}} get_genre_data #