I use django-tables2 LinkColumn to create a column that call a function that allow the export of the object in the table.
forms.py:
class FilesTable(tables.Table):
id = tables.LinkColumn('downloadFile', args=[A('pk')], verbose_name='Export')
I would like the content of this column to be the href to downloadFile function with: Export as the text, not the id.
Something like that should be working (warning I don't have Python here so it's not tested but you'll get the idea):
And then you can use it like
Of course you could always use a TemplateColumn or add a render_id method to your FilesTable but definitely the CustomTextLinkColumn is the most DRY method :)
I can't comment, so I need to add another answer. I will correct that the "render" invocation should not have "self" in the parameter list.
Use, as Serafeim says: