This might sound noob but this is causing me a lot of delay in my work and I have no idea why. I am using Flask to pass some variables to my html, but apparently they don't seem to be able to resolve the values.
Examples:
The url_for here doesn't work I don't really know why:
<link rel ="stylesheet" href = "{{url_for('static', filename='css/bootstrap.min.css')}}">
The graph_data can't be resolved here too. Instead it shows this output graphing.html!
<div class="container" align="left">
<embed type="image/svg+xml" src={{graph_data|safe}} style='max-width:1000px'></embed>
</div>
Even though I already passed the values through Flask
graph = pygal.Line()
graph.title = '% Change Coolness of programming languages over time.'
graph.x_labels = ['2011','2012','2013','2014','2015','2016']
graph.add('Python', [15, 31, 89, 200, 356, 900])
graph_data = graph.render_data_uri()
return render_template("graphing.html", graph_data = graph_data) #Here!
So what's the problem? My file fask-demo.py is located as shown
Structure of the static folder
The code of my graph.html file is
{% extends "header.html" %}
{% block body %}
<body class="body">
<div class="container" align="left">
<embed type="image/svg+xml" src={{graph_data|safe}} style='max-width:1000px'></embed>
</div>
</body>
{% endblock %}
I am assuming that the header file is fine because it is already working with other templates. But I will show it if needed.