Jah*_*l14 2 django django-templates python-3.x
我在 django 模板中收到以下错误消息:第 10 行未封闭的标记:“if”。寻找其中之一:endif。
我在第 20 行使用 endif 来关闭 if 类别。如果页面在第 16 行关闭。不确定这是否是语法问题?
<!DOCTYPE html>
<html>
<head>
<title>Rango</title>
</head>
<body>
<div>
{% if category %}
{{ category.name }}
<ul>
{% if pages %}
{% for page in pages %}
<li> {{ page.title }} </li>
{% endfor %}
</ul>
{% else %}
<strong>No Pages</strong>
{% endif %}
{% else %}
<strong>The specified category does not exist!</strong>
<% endif %}
</div>
</body>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4913 次 |
| 最近记录: |