add message

This commit is contained in:
baoliang 2021-02-23 22:02:31 +08:00
parent 141a8b3ca2
commit 8c642afa2c
7 changed files with 5 additions and 5 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -8,8 +8,9 @@
{% if key|length != 0 %}
<a
class="btn btn-default {% if cities == key %}btn-primary{% endif %}"
href="{% url 'polls_media_unqualified' %}?province={{province}}&cities={{key}}}&district={{district}}&level={{level}}"
href="{% url 'polls_media_unqualified' %}?province={{province}}&cities={{key}}&district={{district}}&level={{level}}"
role="button"
style="margin: 5px; 2px;"
>{{value}}</a
>
{% endif%}
@ -33,16 +34,14 @@
<th>#</th>
<th>名称</th>
<th>单位</th>
<th>原因</th>
</tr>
</thead>
<tbody>
{% for m in medias %}
<tr>
<th scope="row">{{m.counter}}</th>
<th scope="row">{{forloop.counter}}</th>
<td>{{m.name}}</td>
<td>{{m.unit}}</td>
<td>{{m.comment}}</td>
</tr>
{% endfor %}
</tbody>

View File

@ -152,7 +152,8 @@ def monitor_unqualified_result(request):
district = request.GET.get('district','')
version = request.GET.get('version', '0')
level = request.GET.get('level', '0')
q = UnqualifiedMedia.objects.filter(version=version)
print(province, cities, district, level, version)
q = UnqualifiedMedia.objects.filter(version=version).order_by('cities')
if province:
q = q.filter(province=province)
if cities: