Django常用模板标签

a.for 标签,用来循环显示列表各项的值,比如要显示wordpress文章列表:

{% for post in posts %} 
<div>
<h2><a href=”{{ post.guid }}”>{{ post.title }}</a></h2>
{{ post.content }}
</div>
{% endfor  %}

(阅读全文)

posted @ 2010-06-24 08:21 LloydSheng 阅读(104) 评论(0) 编辑 收藏