From aa4e6b7cab00ef397af1f94ef8f9ebb3f4ff6f28 Mon Sep 17 00:00:00 2001 From: Marie PUPO JEAMMET Date: Mon, 6 Jan 2025 17:51:21 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB(admin)=20add?= =?UTF-8?q?=20filter=20and=20search=20function=20to=20admin=20mailboxes=20?= =?UTF-8?q?view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add fields to easily filter and search mailboxes on their statuses, local part and domains --- src/backend/mailbox_manager/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/mailbox_manager/admin.py b/src/backend/mailbox_manager/admin.py index 9c3969f9e..2a3d0a5de 100644 --- a/src/backend/mailbox_manager/admin.py +++ b/src/backend/mailbox_manager/admin.py @@ -61,7 +61,9 @@ class MailDomainAdmin(admin.ModelAdmin): class MailboxAdmin(admin.ModelAdmin): """Admin for mailbox model.""" - list_display = ("__str__", "first_name", "last_name", "status") + list_display = ("__str__", "domain", "status") + list_filter = ("status",) + search_fields = ("local_part", "domain__name") @admin.register(models.MailDomainAccess)