I'm using sekizai in the Professional version of PyCharm to control where my JavaScript code is rendered to in the page.
In my django template code, this means that my JavaScript is not enclosed in the usual <script>
tags and therefore does not have syntax highlighting, e.g. Normally I would have...
<script type="text/javascript">
alert("Syntax highlighting works");
</script>
Instead I have something like:
{% addtoblock "js" %}
alert("No syntax highlighting!");
{% endaddtoblock %}
Is there a quick fix for this? The <script>
tags exist once in my base template and I'm trying to avoid moving the tags inside {% addtoblock %}
:
<script type="text/javascript">
{% render_block "js" %}
</script>