Copied Chris' code to get genre graph working
This commit is contained in:
@@ -46,16 +46,7 @@
|
||||
var y = d3.scaleLinear()
|
||||
.rangeRound([height, 0]);
|
||||
|
||||
// PU: trying to store genreData locally
|
||||
var genreData;
|
||||
d3.json("{% url "api:get_genre_data" user_secret %}",
|
||||
function(data) {
|
||||
genreData = data;
|
||||
}
|
||||
);
|
||||
console.log(genreData);
|
||||
create_genre_graph(genreData);
|
||||
// d3.json("{% url "api:get_genre_data" user_secret %}").then(create_genre_graph);
|
||||
d3.json("{% url "api:get_genre_data" user_secret %}").then(create_genre_graph);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,8 +10,5 @@ urlpatterns = [
|
||||
name='display_genre_graph'),
|
||||
path('audio_features/<str:user_secret>', display_features_graphs,
|
||||
name='display_audio_features'),
|
||||
# path('history/<str:user_secret>', display_history_table,
|
||||
# name='display_history_table'),
|
||||
# path('history/', display_history_table, name='display_history_table'),
|
||||
path('history/', HistoryList.as_view(), name='display_history_table'),
|
||||
]
|
||||
|
||||
@@ -10,8 +10,8 @@ class HistoryTable(tables.Table):
|
||||
template_name = 'django_tables2/bootstrap.html'
|
||||
|
||||
iso_timestamp = tables.Column(accessor='get_iso_timestamp', orderable=False)
|
||||
track_name = tables.Column(accessor='track.name', orderable=False)
|
||||
track_id = tables.Column(accessor='track.id', orderable=False)
|
||||
track_name = tables.Column(accessor='track.name', orderable=False)
|
||||
artists = tables.Column(accessor='get_artists', orderable=False)
|
||||
|
||||
def get_secret_context(user_secret):
|
||||
|
||||
Reference in New Issue
Block a user