Skip to content

Commit 3f6c192

Browse files
committed
fix missing table for empty queryset in examples
1 parent b594b56 commit 3f6c192

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

examples/templates/_books_table.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
</button>
3737
</td>
3838
</tr>
39+
{% empty %}
40+
<p class="no-books text-primary">No books added yet.</p>
3941
{% endfor %}
42+
4043
</tbody>
4144
</table>

examples/templates/index.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ <h4>
5656
{% if 'type' in request.GET %}
5757
<p class="filtered-books">Filtered books.</p>
5858
{% endif %}
59-
{% if books %}
60-
{% include "_books_table.html" %}
61-
{% else %}
62-
<p class="no-books text-primary">No books added yet.</p>
63-
{% endif %}
59+
{% include "_books_table.html" %}
6460
</div>
6561
</div>
6662
</div>

0 commit comments

Comments
 (0)