1👍
✅
You can choose alternative delimiters in JsRender, so as to avoid the conflict with Django delimiters.
https://www.jsviews.com/#settings/delimiters
For example:
$.views.settings.delimiters("<%", "%>");
will change the tag syntax to <%...%>
.
0👍
You can turn on the {% verbatim %} … {% endverbatim %}
template tag [Django-doc]:
{% verbatim %}
<script id="headerTemplate" type="text/x-jsrender">
<h1>{{:label}}</h1>
</script>
{% endverbatim %}
This will thus render the double curly brackets, not interpret these.
- [Answered ]-Should I use two Postgres databases for Django on Heroku – dev & prod?
- [Answered ]-Decode unicode to string in django template
- [Answered ]-Change Django alphabetical ordering to custom ordering
- [Answered ]-How to count in template (not forloop)?
Source:stackexchange.com