How to pass a list from Python, by Jinja2 to JavaScript
To pass some context data to javascript code, you have to serialize it in a way it will be “understood” by javascript (namely JSON). You also need to mark it as safe using the safe Jinja filter, to prevent your data from being htmlescaped. You can achieve this by doing something like that: The view … Read more