

def render(self, context):
    table = self.table.resolve(context)
    if isinstance(table, tables.Table):
        pass
    elif hasattr(table, 'model'):
        queryset = table

        class OnTheFlyTable(tables.Table):

            class Meta():
                model = context.model
                attrs = {
                    'class': 'paleblue',
                }
        table = OnTheFlyTable(queryset)
        request = context.get('request')
        if request:
            RequestConfig(request).configure(table)
    else:
        raise ValueError(("Expected table or queryset, not '%s'." % type(table).__name__))
    if self.template:
        template = self.template.resolve(context)
    else:
        template = table.template
    if isinstance(template, six.string_types):
        template = get_template(template)
    else:
        template = select_template(template)
    context.update({
        'table': table,
    })
    try:
        table.context = context
        return template.render(context.flatten())
    finally:
        del table.context
        context.pop()

dataset/ETHPy150Open bradleyayers/django-tables2/django_tables2/templatetags/django_tables2.py RenderTableNode.render/VarMisuse@73/84 `queryset`->`context`