【发布时间】:2013-10-04 22:13:24
【问题描述】:
我是 Django 初学者,正在使用 this youtube 教程构建博客。下面的代码行在博客正文的末尾添加了一个可点击标签列表。
<div class="tags">
{% for tag in post.tags.all %}
<a href="blog/tag{{tag}}" >{{tag}}</a>
{% if not forloop.last %},{% endif %}
{{% endfor %}}
</div>
但是,我在第二行收到此错误:
TemplateSyntaxError at /blog/
Could not parse the remainder: '% endfor %' from '% endfor %'
任何帮助将不胜感激。谢谢。
【问题讨论】: