class PersonColumn(tables.Column):
attrs = {
'td': {
'data-first-name': lambda record: record.first_name
'data-last-name': lambda record: record.last_name
}
}
def render(self, record):
return '{} {}'.format(record.first_name, record.last_name)
class Table(tables.Table):
person = PersonColumn()