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

dynamically delete buttons

This commit is contained in:
Pierre-antoine Comby
2020-03-24 22:12:44 +01:00
parent 8ab142c122
commit ba04a6555f
3 changed files with 31 additions and 5 deletions

View File

@ -90,5 +90,10 @@ class ButtonTable(tables.Table):
model = TransactionTemplate
delete = tables.TemplateColumn(template_code="""
<button id="{{ record.pk }}" class="btn btn-danger" onclick="delete_button(this.id)"> delete </a>
""")
def render_amount(self, value):
return pretty_money(value)