bradleyayers/django-tables2 — Issue #41: ``render_table`` using custom template does not work:w
Author: jcmcken
Created: 2011-11-08 01:59:12+00:00
State: open

Using something like this in my template produces errors:

{% load django_tables2 %}
{% render_table table "table.html" %}

Line 177 of django_tables2/templatetags/django_tables2.py throws a NameError because you don't import select_template.

Adding the import produces a TypeError:

``Caught TypeError while rendering: 'FilterExpression' object is not iterable``

...which is thrown by ``select_template``.

It shouldn't get to that point, because I'm passing it a string. But ``render_table`` is being sent a FilterExpression, which needs to be stringified using ``FilterExpression.var`` (I guess?)