1π
I found a way myself (not sure at all if itβs the best solution or not) :
tables:
class UserListTable(tables.Table):
delete = tables.LinkColumn(
'account_delete',
args= [A('pk')],
attrs= {
'a': {'class': 'btn'}
},
text = 'Delete',
)
class Meta:
model = User
exclude = ("password", "is_superuser", "is_staff", "is_active", "last_login", "date_joined")
attrs = {
'class': 'paleblue',
'th': {
'class': 'TEST',
},
}
url :
path('account/delete/<int:pk>/', views.account_delete, name='account_delete')
π€jeyremd
Source:stackexchange.com