东方耀AI技术分享
标题:
35、python_django_web开发_课程机构的筛选(城市和类别)与排序_...
[打印本页]
作者:
东方耀
时间:
2017-11-26 19:46
标题:
35、python_django_web开发_课程机构的筛选(城市和类别)与排序_...
35、python_django_web开发_课程机构的筛选(城市和类别)与排序_笔记
列表筛选功能 城市的筛选与类别的筛选
课程机构的筛选(城市和类别)与排序
机构的排名 排序功能
<font face="微软雅黑" size="5">{% ifequal city_id city.id|stringformat:'i' %}
active2
{% endifequal %}
# 对热门机构的提取
hot_orgs = all_orgs.order_by('-click_num')[:5]
{% for hot_org in hot_orgs %}
<dl class="des">
<dt class="num fl">{{ forloop.counter }}</dt>
<dd>
<a href="/company/2/"><h1>{{ hot_org.name }}</h1></a>
<p>{{ hot_org.address }}</p>
</dd>
</dl>
{% endfor %}</font>
复制代码
作者:
xiaoma
时间:
2017-12-14 14:52
1
作者:
渡口
时间:
2018-6-8 22:19
非常感谢
作者:
xiaodan
时间:
2018-12-26 15:47
谢谢老师
作者:
tchsong
时间:
2019-11-8 12:32
城市的筛选与类别的筛选
欢迎光临 东方耀AI技术分享 (http://www.ai111.vip/)
Powered by Discuz! X3.4