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

@@ -20,8 +20,13 @@
{% endfor %}
</ul>
<pre> {% filter force_escape %} {% debug %} {% endfilter %} </pre>
<script src="http://d3js.org/d3.v3.js"></script>
{% load static %}
<script src="{% static "spotifyvis/scripts/test_db.js" %}"></script>
<script src="https://d3js.org/d3.v5.min.js"></script>
<script>
d3.json("{% url "get_artist_data" user_id %}").then(function(data) {
data.forEach(function(d) {
console.log(d.name, d.num_songs);
});
});
</script>
</body>
</html>