1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-29 19:42:22 +00:00
plateforme-tfjm2/apps/member/tables.py

27 lines
602 B
Python
Raw Normal View History

2020-04-29 14:59:59 +00:00
import django_tables2 as tables
2020-05-04 22:56:34 +00:00
from django_tables2 import A
2020-04-29 14:59:59 +00:00
2020-05-11 12:08:19 +00:00
from .models import TFJMUser
2020-04-29 14:59:59 +00:00
class UserTable(tables.Table):
2020-05-11 12:08:19 +00:00
"""
Table of users that are matched with a given queryset.
"""
2020-05-04 22:56:34 +00:00
last_name = tables.LinkColumn(
"member:information",
args=[A("pk")],
)
first_name = tables.LinkColumn(
"member:information",
args=[A("pk")],
)
2020-04-29 14:59:59 +00:00
class Meta:
model = TFJMUser
2020-04-30 19:07:12 +00:00
fields = ("last_name", "first_name", "role", "date_joined", )
attrs = {
'class': 'table table-condensed table-striped table-hover'
}