1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-02-06 07:13:00 +00:00
nk20/apps/treasury/tables.py
2020-03-21 16:49:18 +01:00

29 lines
962 B
Python

# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
import django_tables2 as tables
from django_tables2 import A
from .models import Billing
class BillingTable(tables.Table):
id = tables.LinkColumn("treasury:billing_update", args=[A("pk")])
render = tables.LinkColumn("treasury:billing_render",
args=[A("pk")],
accessor="pk",
text="",
attrs={
'a': {'class': 'fa fa-file-pdf-o'},
'td': {'data-turbolinks': 'false'}
})
class Meta:
attrs = {
'class': 'table table-condensed table-striped table-hover'
}
model = Billing
template_name = 'django_tables2/bootstrap4.html'
fields = ('id', 'name', 'subject', 'acquitted', 'render', )