bradleyayers/django-tables2 — pull request #118 by dyve (2012-11-23 13:04:02+00:00)
Title: Add request parameter to Table

With this small modification, you can write cleaner code in your views.

Instead of

def people(request):
table = PersonTable(Person.objects.all())
RequestConfig(request).configure(table)
return render(request, 'people.html', {'table': table})

You can now write

def people(request):
table = PersonTable(Person.objects.all(), request=request)
return render(request, 'people.html', {'table': table})

No need for RequestConfig in view files if the table is to be immediately passed to render.