Tables pass data via the querystring to indicate ordering and pagination preferences.
The names of the querystring variables are configurable via the options:
Each of these can be specified in three places:
If you’re using multiple tables on a single page, you’ll want to prefix these fields with a table-specific name. e.g.
def people_listing(request):
config = RequestConfig(request)
table1 = PeopleTable(Person.objects.all(), prefix='1-') # prefix specified
table2 = PeopleTable(Person.objects.all(), prefix='2-') # prefix specified
config.configure(table1)
config.configure(table2)
return render(request, 'people_listing.html', {
'table1': table1,
'table2': table2
})