Skip to content

Commit 475dd3d

Browse files
committed
Add basic docs, remove stub get_context_data
1 parent 7691bf3 commit 475dd3d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

django_tables2/columns/templatecolumn.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class TemplateColumn(Column):
1515
Arguments:
1616
template_code (str): template code to render
1717
template_name (str): name of the template to render
18+
context_object_name (str): name of the context variable to pas the record in, defaults to "record".
1819
extra_context (dict): optional extra template context
1920
2021
A `~django.template.Template` object is created from the
@@ -25,6 +26,7 @@ class TemplateColumn(Column):
2526
- *default* -- appropriate default value to use as fallback.
2627
- *row_counter* -- The number of the row this cell is being rendered in.
2728
- any context variables passed using the `extra_context` argument to `TemplateColumn`.
29+
If ``extra_context`` is a callable, it will be called with optional record, table, value, bound_column arguments.
2830
2931
Example:
3032
@@ -91,6 +93,3 @@ def value(self, **kwargs):
9193
"""
9294
html = super().value(**kwargs)
9395
return strip_tags(html).strip() if isinstance(html, str) else html
94-
95-
def get_context_data(self, **kwargs):
96-
return

0 commit comments

Comments
 (0)