Handlebars.js in Django templates

前端 未结 8 1564

I need a javascript templating system and i think handlebars.js does an excellent job in this case. I\'m having syntax conflicts with handlebars templates inside a django te

8条回答
  •  时光取名叫无心
    2020-12-24 06:42

    I use a custom template tag for another js templating system, here: https://gist.github.com/629508

    Use in template:

    {% load mytags %}
    {% verbatim %}
      {{ This won't be touched by {% django's %} template system }}
    {% endverbatim %}
    

    Edit: This custom template tag is no longer necessary, as Django's template language now supports the {% verbatim %} template tag.

提交回复
热议问题