|
|
@ -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 # |