To create a table from a model django-table2 can be used.
Add django-table2 to the requirements and config file under installed apps: ::
nano requirement/project.txt
...
-e git://github.com/bradleyayers/django-tables2.git#egg=django-tables2
...
nano settings.py
...
INSTALLED_APPS = (
...
'django-tables2'
...
In the view pass the data, e.g.: ::
nano views.py
...
from django.shortcuts import render
from data.models import entry
def view(request):
return render(request, 'entries.html', {'entries': Entry.objects.all()})
In the template load django-tables2, its static files and render the tables: ::
nano entries.html
{# Exemplifies rendering of a table #}
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="{{ STATIC_URL }}django_tables2/themes/paleblue/css/screen.css" />
</head>
<body>
{% render_table entries %}
</body>