[Answer]-Django tables 2: LinkColumn

1👍

Django-tables2 uses the name of the column to look up the value to be shown on the model. Does you model have a link field? If not, this will be blank. Alternatively, you can supply a ‘default’ attribute on the column, i.e.

class ScanTable(tables.Table):
    link = tables.LinkColumn('detail', args=[tables.A('pk')], default='Link')

    class Meta:
        model = Scan
        attrs = {'class':'paleblue'}

Leave a comment