我正在使用 django 来构建我的网站,并且我正在以这种方式动态添加 html 代码:
{% for ad in ads_search %}
<li class="span3" id="list-all">
<a href="#" class="thumb">
<div id="most-viewed">
<div class="tag" id="tag-cinema"></div>
<img src="{{ad.image_url}}" alt="">
<p>{{ad.name}}</p>
<div class="barra-pequena"></div>
<ul class=" unstyled">
<li><div class="local"><p>{{ad.local}}</p></div></li>
<li class="pull-right"><div class="price"><h5> {{ad.price}} </h5></div></li>
<li><div class="clock"><p>Horário</p></div></li>
</ul>
</div>
</a>
</li>
{% endfor %}
但我想补充:
<ul class="inline">
每四个广告。我该怎么做?