{% extends "base.html" %}
{% load render_table from django_tables2 %}
{% load django_tables2 crispy_forms_tags %}
{% load model_name %}

{% block heading %}{% include "heading.html" %}{%endblock%}

{% block content %}
{% if object_list %}
{% if filter %}
<div class="d-flex p-2 align-items-end">  
  <form action="" method="get" class="form">
    {% crispy filter.form 'bootstrap4' %}
  </form>
</div>
{% endif %}
{% render_table table %}
<p class="text-center"><em>{{ page_obj.paginator.count }} objects found</em></p>
{% else %}
{% if request.GET.filter %}
<p>No objects match your filter. <a href="{% url view.model|model_list %}">Reset filter</a></p>
{% else %}
<p>There are no objects in the list. <a href="{% url view.model|model_add %}">Add one</a> now!</p>
{% endif %}
{% endif %}
{% endblock %}
