title: How to raise error message if data does not exist in django table
body: <p>I have my table and filter all set up and working but I wish to have an error functionality added to it in such a way that when I query a data which exist in the db, it should show me the result normally, however, when I input a qs which does not exist, it should show me a message on the table that says "record does not exist" instead of a blank table.</p>
  
  <p>Here is my view:</p>
  
  <pre><code>from django.contrib.auth.decorators import login_required
  from django.contrib.auth.models import User
  from django.shortcuts import render
  from django_tables2 import RequestConfig
  from django_tables2.export import TableExport
  
  from .models import Employee
  from .models import EmployeeFilter
  from .tables import EmployeeTable
  
  
  @login_required()
  def employees(request):
      filter = EmployeeFilter(request.GET, queryset=Employee.objects.all())
      table = EmployeeTable(filter.qs)
      RequestConfig(request).configure(table)
      count = Employee.objects.all().count()
      male_count = Employee.objects.filter(gender__contains='Male').count()
      female_count = Employee.objects.filter(gender__contains='Female').count()
      user_count = User.objects.all().count()
  
      export_format = request.GET.get("_export", None)
  
      if TableExport.is_valid_format(export_format):
          exporter = TableExport(export_format, table)
          return exporter.response("table.{}".format("csv", "xlsx"))
  
      return render(request, "employees/employees.html", {
          "table": table,
          "filter": filter,
          "count": count,
          "male_count": male_count,
          "female_count": female_count,
          "user_count": user_count,
      })
  </code></pre>
  
  <p>Form Template:</p>
  
  <pre><code>&lt;!--filter form--&gt;
                              &lt;form action="" class="form form-inline employee-filter-form" method="get"&gt;
                                  &lt;legend class="mb-2"&gt;Filter employee records&lt;/legend&gt;
                                  &lt;div class="fieldWrapper"&gt; 
                                      {{ filter.form.first_name }}
                                  &lt;/div&gt;
                                  &lt;div class="fieldWrapper"&gt;
                                      {{ filter.form.last_name }}
                                  &lt;/div&gt;
                                  &lt;button aria-expanded="false" aria-haspopup="true"
                                          class="ml-2 btn btn-danger filter-btn" type="submit"&gt;
                                      Filter
                                  &lt;/button&gt;
                              &lt;/form&gt;
  </code></pre>