Starting treasury app
This commit is contained in:
parent
1f004191a8
commit
71346476df
12 changed files with 197 additions and 0 deletions
20
apps/treasury/tables.py
Normal file
20
apps/treasury/tables.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django_tables2 import tables
|
||||
|
||||
from .models import Billing
|
||||
|
||||
|
||||
class BillingTable(tables.Table):
|
||||
class Meta:
|
||||
attrs = {
|
||||
'class': 'table table-condensed table-striped table-hover'
|
||||
}
|
||||
model = Billing
|
||||
template_name = 'django_tables2/bootstrap4.html'
|
||||
fields = ('id', 'name', 'subject', 'acquitted', )
|
||||
row_attrs = {
|
||||
'class': 'table-row',
|
||||
'data-href': lambda record: record.pk
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue