Hi,
I am trying to use a template with a d3.js script on my page. When served from the root of the page, the template works perfectly, the graph is served by d3.js. The template (for purposes of setting up, I want to use my own data/details later) is basically this: http://bl.ocks.org/mbostock/4062045#miserables.json
@app.route('/')
def index():
return render_template('index.html')
However, when trying to serve it from another page, the script no longer works (i.e. the page displayed is blank, but has the desired title, so the template obviously is found/read).
@app.route('/about/')
def about():
return render_template('d3example.html') # same html as index.html
The ds3.js file is located in a "static" folder, whereas the html file(s) are located in a "templates" folder, both located inside "mysite" folder. The static files path has been set up in the "web" tab.