With the following table when returning the BoundColumn
it is plaintext and not html.
class CarHistoryTable(tables.Table):
edit = tables.LinkColumn(
'Car:update',
kwargs={'pk': A('id')},
orderable=False,
text='Edit'
)
def render_edit(self, record, value, bound_column):
if record.state != Car.NEW:
return ''
return super().render_edit()
Ideally I want to return an empty text for Cars that are not NEW
state. For other cars I would like to render the edit link.