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

List pending users

This commit is contained in:
Yohann D'ANELLO
2020-04-05 06:40:03 +02:00
parent 49807d33d9
commit f10497bac3
11 changed files with 95 additions and 13 deletions

View File

@ -0,0 +1,23 @@
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
import django_tables2 as tables
from django.contrib.auth.models import User
class FutureUserTable(tables.Table):
phone_number = tables.Column(accessor='profile.phone_number')
section = tables.Column(accessor='profile.section')
class Meta:
attrs = {
'class': 'table table-condensed table-striped table-hover'
}
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
}