我如何在模板的单个表主体中添加两个for循环

问题描述 投票:0回答:1

我需要在表主体中添加两个不同的查询集

<thead>
<th> username </th>
<th>place</th>
</thead>

{% for i, j in user_group1, user_group2 %}
<tbody>
    <td>user1</td>
    <td>user2</td>
</tbody>
{% endfor %}

我需要用户列表,我该怎么做

python-2.7 templates jinja2 django-1.11
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.