def METHOD_NAME():
    # language=rst
    """
    Creating tables from models
    ---------------------------
    Say I have some model:
    """
    class Foo(models.Model):
        a = models.IntegerField()
        def __str__(self):
            return f'Foo: {self.a}'
    # @test
        class Meta:
            app_label = 'docs_tables'
    assert str(Foo(a=7)) == 'Foo: 7'
    # @end
    class Bar(models.Model):
        b = models.ForeignKey(Foo, on_delete=models.CASCADE)
        c = models.CharField(max_length=255)
    # @test
        class Meta:
            app_label = 'docs_tables'
    # @end
    # language=rst
    """
    Now I can display a list of `Bar` in a table like this:
    """
    def my_view(request):
        return Table(auto__model=Bar)
    # @test
    my_view(req('get'))
    # @end
    # language=rst
    """
    This automatically creates a table with pagination and sorting. If you pass
    `query_from_indexes=True` you will get filters for all the model fields
    that have database indexes. This filtering system includes an advanced filter
    language. See :doc:`queries` for more on filtering.
    """