def init_data(self):
# check if window.graph_data already exists
# if so then return True
# else create window.graph_data = {} then return false
js_code = """
window.graph_data = [];
window.current_graph_id = -1;
window.current_graph_id2 = 0;
/*
require(['d3'], function(d3){
window.d3 = d3;
});
*/
"""
return Javascript(js_code)
评论列表
文章目录