Chartjs-Django and Chartjs template conflict

1👍

You can use the verbatim tag.

{% verbatim %}
    tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>"
{% endverbatim %}

There is also a templatetag tag which you can use to output special template tag characters, but that would be quite verbose.

tooltipTemplate: "<%if (label){% templatetag openblock %}><%=label%>: <%{% templatetag closeblock %}><%= value %>"

Leave a comment