Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法分析django中的提醒_Django_Django Templates_Jquery Templates - Fatal编程技术网

无法分析django中的提醒

无法分析django中的提醒,django,django-templates,jquery-templates,Django,Django Templates,Jquery Templates,我想在jquery模板中添加一个脚本标记。所以我指的是这个。 它指示按以下方式关闭内部脚本标记: <script id="filaVideoTemplate" type="text/x-jQuery-tmpl"> <!-- Some HTML here --> <script type="text/javascript"> <!-- Some javascript here --> {{html "</sc"+

我想在jquery模板中添加一个脚本标记。所以我指的是这个。 它指示按以下方式关闭内部脚本标记:

<script id="filaVideoTemplate" type="text/x-jQuery-tmpl">
    <!-- Some HTML here -->
    <script type="text/javascript">
    <!-- Some javascript here -->
    {{html "</sc"+"ript>"}}
</script>

{{html”“}}
我试过了,但django显示了这个错误: 无法分析“html”“中的其余部分:“”


1.我怎么能这样做。django中是否有任何特定的解决方案?

{
}
是django模板中的保留字符,因此需要使用

替换:

{{html "</sc"+"ript>"}}
{{html”“}
与:

{%templatetag openbrace%}{%templatetag openbrace%}html”“{%templatetag closebrace%}{%templatetag closebrace%}

Hi Dominic,在“”后面有一个不必要的右括号。请把它拿走。
{% templatetag openbrace %}{% templatetag openbrace %}html "</sc"+"ript>"{% templatetag closebrace %}{% templatetag closebrace %}