正如建议的那样,我想在 .html 文件中编写 hogan.js 代码,该文件位于烧瓶结构的模板文件夹中。当我执行 python 文件时,索引页面呈现波纹管错误
jinja2.exceptions.TemplateSyntaxError
TemplateSyntaxError: unexpected char u'#' at 36667
我还附上了下面的 index.html 代码的一部分。
<div class="cell link">
<a href="{{url}}"> >> view {{type}} details</a>
{{#console_id}}
<a href="/project/instances/{{console_id}}/vnc" class="vnc_window">» open console</a>
{{/console_id}}
</div>
python文件代码
@app.route('/')
def index():
return render_template('index.html')
我还包括了 hogan.js 文件
<script src="{{ url_for('static', filename='horizon/lib/hogan-2.0.0.js') }}" type="text/javascript"></script>
请帮我找出这个错误。