Python 3.x django模板中的{%%}标记
我浏览了django文档,在模板中找到了这段代码Python 3.x django模板中的{%%}标记,python-3.x,django-templates,Python 3.x,Django Templates,我浏览了django文档,在模板中找到了这段代码 {% if latest_question_list %} <ul> {% for question in latest_question_list %} <li><a href="/polls/{{ question.id }}/">{{ question.question_text }}</a></li> {% endfor %} </ul> {% else %}
{% if latest_question_list %}
<ul>
{% for question in latest_question_list %}
<li><a href="/polls/{{ question.id }}/">{{ question.question_text }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}
{%if最新问题列表%}
{最新问题列表%中的问题%
{%endfor%}
{%else%}
没有投票
{%endif%}
那么有人能解释一下{%%}
标签代表什么吗。它像php中的标签吗?如果是这样,为什么不添加一个标签并打印其余的html代码