授课机构不能被迭代出来
来源:7-2 django templates模板继承2
cherrylove123
2018-11-20
{% for course_org in all_orgs %}
<dl class="des difdes">
<dt>
<a href="org-detail-homepage.html">
<img width="200" height="120" class="scrollLoading" data-url="{{ MEDIA_URL }}{{ course_org.image }}"/>
</a>
</dt>
<dd>
<div class="clearfix">
<a href="org-detail-homepage.html">
<h1>{{ course_org.name }}</h1>
<div class="pic fl">
<img src="{% static 'images/authentication.png' %}"/>
<img src="{% static 'images/gold.png' %}"/>
</div>
</a>
</div>
<ul class="cont">
<li class="first"><p class="pic9">课程数:<span>1</span></p><p class="c7">学习人数:<span>1000</span></p></li>
<li class="c8" style="padding-left:18px;">北京市海淀区中关村北大街</li>
<li class="pic10" style="padding-left:18px;">经典课程:
<a href="/diary/19/">c语言基础入门</a>
<a href="/diary/16/">数据库基础</a>
</li>
</ul>
</dd>
<div class="buy start_groupbuy jsShowPerfect2" data-id="22"><br/>联系<br/>服务</div>
</dl>
{% endfor %}好气呀,课程机构就是迭代不出了

写回答
2回答
-
Royal_Liang
2018-11-22
因为使用了分页,所以不能直接使用all_orgsl了,得使用all_orgs.object_list,同学
20 -
bobby
2018-11-22

这个是课程中的代码 你这里写错了00
相似问题

这个是课程中的代码 你这里写错了