Bos*_*ohn 3 python django templates handlebars.js ember.js
我正在使用django来提供包含把手模板的页面.混合服务器和客户端模板会产生一些歧义.如果我有一个模板
<script id="my-script" type="text/x-handlebars-template">
<p> {{clientSideContent}} </p>
</script>
Run Code Online (Sandbox Code Playgroud)
我怎么能告诉django模板引擎{{clientSideContent}}标签不适合它(因为django和把手使用相同的标签)?django中是否有原始字符串标记,或者是另一种解决此问题的好方法?
小智 5
我认为这应该可以解决你的问题
https://gist.github.com/ericflo/629508
所以使用类似的东西
{% verbatim %} {{clientSideContent}} {% endverbatim %}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
544 次 |
| 最近记录: |