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

Display matched alias in user table

This commit is contained in:
Yohann D'ANELLO
2020-08-06 13:07:22 +02:00
parent 0de69cbfaf
commit cba6a35b6c
2 changed files with 9 additions and 5 deletions

View File

@ -38,6 +38,8 @@ class UserTable(tables.Table):
"""
List all users.
"""
alias = tables.Column()
section = tables.Column(accessor='profile.section')
balance = tables.Column(accessor='note.balance', verbose_name=_("Balance"))
@ -50,7 +52,7 @@ class UserTable(tables.Table):
'class': 'table table-condensed table-striped table-hover'
}
template_name = 'django_tables2/bootstrap4.html'
fields = ('last_name', 'first_name', 'username', 'email')
fields = ('last_name', 'first_name', 'username', 'alias', 'email')
model = User
row_attrs = {
'class': 'table-row',