I have some data which I am passing from my views to my templates, whenever the else if the statement is true(that is the if the statement is false) the statement appears after my HTML header().
My main issue is that why is the else block not under the HTML heaader where I have put it in the code
templates.html
<table class="table table-borderless table-data3">
<thead>
<tr>
<th>No</th>
<th>Email</th>
<th>Telephone</th>
<th>Country</th>
<th>Status</th>
<th>Image</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% if supplier %}
{% for supplier in suppliers %}
<tr>
<td>{{forloop.counter}}</td>
<td>{{supplier.email}}</td>
<td>{{supplier.telephone}}</td>
<td>{{supplier.country}}</td>
<td class="process">Active</td>
<td>{{supplier.image.url}}</td>
<td>
<div class="table-data-feature">
<button class="item" data-toggle="tooltip" data-placement="top" title="Edit">
<i class="zmdi zmdi-edit"></i>
</button>
<button class="item" data-toggle="tooltip" data-placement="top" title="Delete">
<i class="zmdi zmdi-delete"></i>
</button>
</div>
</td>
</tr>
{% endfor %}
{% else %}
<h2>No supplier available</h2>
{% endif %}
</tbody>
</table>
