IdHub/idhub/admin/tables.py
Cayo Puigdefabregas 9ae75b00ab fix translate
2023-12-14 17:15:22 +01:00

26 lines
692 B
Python

import django_tables2 as tables
from django.utils.translation import gettext_lazy as _
from idhub.models import Rol, Event
from idhub_auth.models import User
class UserTable(tables.Table):
class Meta:
model = User
template_name = "idhub/custom_table.html"
fields = ("first_name", "last_name", "email", "is_active", "is_admin")
class RolesTable(tables.Table):
class Meta:
model = Rol
template_name = "idhub/custom_table.html"
fields = ("name", "description")
class DashboardTable(tables.Table):
class Meta:
model = Event
template_name = "idhub/custom_table.html"
fields = ("type", "message", "created")