This question must be obvious but I can\'t figure it out.
In a template, I link to a js file in my media directory. From that file, I would like to access a context
In addition to Andrzej Bobak's answer, you can also generate a global variable in Javascript from your template. For example, your template might generate code like this:
Your script could then refer to my_chart.
my_chart