Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Enable support for django tags inside js

enter image description herei currently have to use django template tags inside js script inside a django html template.

Example:

<script>

{% for od in object %}
[convertDate("{{ od.date_recorded|date:'Y-m-d' }}"), {{ od.value_recorded }}],
{% endfor %}

</script>

visual studio code shows error, is there a way to enable this support?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

On the image to not have the red underline error

>Solution :

This has already been answered in a different post

scripting error in django template creation

You can install a visual studio code extension for django templates: https://marketplace.visualstudio.com/items?itemName=bibhasdn.django-html

This should solve your problem.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading