diff --git a/django_tables2/columns/templatecolumn.py b/django_tables2/columns/templatecolumn.py index c3036207..2bb9f69b 100644 --- a/django_tables2/columns/templatecolumn.py +++ b/django_tables2/columns/templatecolumn.py @@ -15,7 +15,9 @@ class TemplateColumn(Column): Arguments: template_code (str): template code to render template_name (str): name of the template to render - extra_context (dict): optional extra template context + context_object_name (str): name of the context variable to pas the record in, defaults to "record". + extra_context (dict): optional extra template context. If a callable is passed, it will be called with + optional record, table, value, bound_column arguments. A `~django.template.Template` object is created from the *template_code* or *template_name* and rendered with a context containing: @@ -91,6 +93,3 @@ def value(self, **kwargs): """ html = super().value(**kwargs) return strip_tags(html).strip() if isinstance(html, str) else html - - def get_context_data(self, **kwargs): - return