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

Dynamic user research

This commit is contained in:
Yohann D'ANELLO
2020-04-01 20:14:16 +02:00
parent 2853fe252b
commit 5eb08fd822
7 changed files with 59 additions and 58 deletions

View File

@ -31,7 +31,11 @@ class ClubTable(tables.Table):
class UserTable(tables.Table):
section = tables.Column(accessor='profile.section')
solde = tables.Column(accessor='note.balance')
balance = tables.Column(accessor='note.balance', verbose_name=_("Balance"))
def render_balance(self, value):
return pretty_money(value)
class Meta:
attrs = {
@ -40,6 +44,10 @@ class UserTable(tables.Table):
template_name = 'django_tables2/bootstrap4.html'
fields = ('last_name', 'first_name', 'username', 'email')
model = User
row_attrs = {
'class': 'table-row',
'data-href': lambda record: record.pk
}
class MembershipTable(tables.Table):