Шаблон Django удваивает данные [закрыто]

Мне нужно вывести информацию на экран, но она выводится дважды. Кто-нибудь знает, как соединить (list и disci) вместе, так как я знаю, что ошибка в моем коде с for i, for j и {% endfor %} in double.

Employe и Disciplinaire - это две разные таблицы с собственными данными.

page.html

<tr>
  <th scope="col">Matricule</th>
  <th scope="col">Prenom</th>
  <th scope="col">Nom</th>
  <th scope="col">Avis Verbal</th>
    <th scope="col">1er Avis Écrit</th>
    <th scope="col">2er Avis Écrit</th>
    <th scope="col">Suspension</th>
    <th scope="col">Fin d'emploi</th>
    <th scope="col">Actions</th>
</tr>
 {% for i in liste %}
 {% for j in disci %}
      <tr>
        <td>{{i.Matricule}}</td>
        <td>{{i.Prenom}}</td>
        <td>{{i.Nom}}</td>
        <td>{{j.Avis_verbal}}</td>
        <td>{{j.Avis_ecrit}}</td>
        <td>{{j.Avis_ecrit2}}</td>
        <td>{{j.Suspension}}</td>
        <td>{{j.Fin_emploie}}</td>
        <td><a href="">Editer </a>/<a href=""> Supprimer</a></td>
      </tr>
    {% endfor %}
    {% endfor %}

views.py

def disciplinaire(request):
disci = Disciplinaire.objects.all()
liste = Employe.objects.all()

return render(request, 'accounts/page.html', {'disci':disci, 'liste':liste})

Скриншот страницы.html

Вернуться на верх