I would really like to use the Javascript template system with Django. The syntax and style of Mustache.js (and its derivatives) really goes well with me. The problem is that the separator tag used by Mustache doesn’t work well with the syntax of the Django template system.
Is there a good way to use them together?
I tried using this verbatim snippet to display JS templates correctly. The problem with this solution is that I still need Django variables or URLs inside JS.
I also tried changing the separator to Mustache using
{{=[[ ]]=}}
However, this does not allow the use of section tags, for example {{# #}. The author said that he intends to completely remove this feature in future releases.
Are there template libraries for Javascript that keep a close eye on Mustache.js but use different delimiters? Or is there another solution for changing separators Mustache.js uses?
source share