1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

add delete boutons, work with only one alias

This commit is contained in:
Pierre-antoine Comby
2020-02-28 15:25:45 +01:00
parent c77bc0c032
commit db95944574
2 changed files with 11 additions and 8 deletions

View File

@ -3,7 +3,7 @@
import django_tables2 as tables
from django.db.models import F
from django_tables2.utils import A
from .models.transactions import Transaction
from .models.notes import Alias
@ -32,8 +32,8 @@ class AliasTable(tables.Table):
'table table condensed table-striped table-hover'
}
model = Alias
fields = ('name',)
fields = ('name','pk')
template_name = 'django_tables2/bootstrap4.html'
# delete = tables.LinkColumn('member:user_alias_delete', args=[A('id')], attrs={
# 'a': {'class': 'btn'} })
delete = tables.LinkColumn('member:user_alias_delete', args=[A('pk')], attrs={
'a': {'class': 'btn btn-danger'} },text='delete')