1π
β
VS Code depends on plugins to understand most languages. A django template plugin (e.g. Django, Django Templates, et. al) will fix the issue.
Aside: Do note that mixing Django template language with javascript will potentially make it very difficult to extract the javascript into its own file later (for bundling/transpiling/etc.). Itβs usually better to feed django data to a javascript function that does the looping.
π€thebjorn
Source:stackexchange.com