This is my Route.py
def route_template(template):
x = 3
return render_template("home/" + template, segment=segment,x=x)
i want to show x in Javascript
var graph = Morris.Donut({
element: 'morris-donut-chart',
data: [{
value: 100, # here want to add jinja
label: 'Data 1'
},
{
value: 1,
label: 'Data 1'
},
],
});
i try this but not working value: {{X}}, .. what is best way to add jinja in Javascript