Clean up utils.py to use database

Uses of the original library_stats dictionary in utils.py were either removed or commented out, replaced by the saving of models into the database.
This commit is contained in:
Chris Shyi
2018-06-08 18:45:16 -04:00
parent 29ab115f91
commit 797115e9cb
5 changed files with 109 additions and 87 deletions

View File

@@ -1,10 +1,4 @@
console.log("{{ user_id }}");
artist_data = JSON.parse('{{ artist_data }}');
artist_data.forEach(function(d) {
console.log(d.name, d.num_songs);
});
d3.json("{% url "get_artist_data" user_id %}", function(error, data) {
d3.json("{% url "get_artist_data", user_id %}").then(function(error, data) {
data.forEach(function(d) {
console.log(d.name, d.num_songs);
});