【发布时间】:2019-06-12 07:11:00
【问题描述】:
<thead>
<th> username </th>
<th>place</th>
</thead>
{% for i, j in user_group1, user_group2 %}
<tbody>
{% if i %}
<td>{{ i.username }}</td>
<td>{{ i.place }}</td>
{% else %}
<td>{{ j.username }}</td>
<td>{{ j.place }}</td>
{% endif %}
</tbody>
{% endfor %}
我想在一个单一的表体中使用两个 for 循环。首先我需要开始第一个,然后我需要开始下一个。我该怎么做呢
【问题讨论】:
标签: python-2.7 django-templates jinja2 django-1.11