I have this in my flask views.py
def showpage():
...
test = [1,2,3,4,5,6]
return render_template("sample.html",test=test)
I have this in my sample .html
<script> var counts = {{test}}; </script>
This gives me a empty counts variable. How can I get the counts same as the test list in python?
<script> var counts = ; </script>or something else?