From fcdd5cb66220963ad960c28227fab1aeb863f633 Mon Sep 17 00:00:00 2001 From: lokses Date: Sat, 25 Jul 2026 11:21:15 +0300 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=B4=D0=BC=D0=B8=D0=BD=D0=BA=D0=B0:=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20=D0=BF=D1=80=D0=B8=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=B4=D1=80=D0=BE=D0=BF=D0=B4=D0=B0=D1=83=D0=BD-=D1=84=D0=B8?= =?UTF-8?q?=D0=BB=D1=8C=D1=82=D1=80=D0=BE=D0=B2=20=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BE=D1=87=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Дропдаун-фильтры unfold рендерятся как форма и не применяются сами по выбору — добавлен list_filter_submit=True (кнопка «Застосувати»), иначе фильтр «не отрабатывал». Co-Authored-By: Claude Opus 4.8 --- core/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/admin.py b/core/admin.py index 973f4f8..104c81f 100644 --- a/core/admin.py +++ b/core/admin.py @@ -135,7 +135,8 @@ class DirectoryAdmin(ModelAdmin, ImportExportModelAdmin): list_display = ['name_with_hierarchy', 'directory_type', 'code', 'is_active', 'updated_at'] list_display_links = ['name_with_hierarchy'] list_filter = [DirectoryTypeFilter, ActiveFilter] - list_filter_sheet = False # фильтры сверху горизонтально, а не в боковой панели + list_filter_sheet = False # фильтры сверху горизонтально, а не в боковой панели + list_filter_submit = True # дропдаун-фильтрам нужна кнопка применения ordering = ('_path',) actions_list = ['rebuild_tree_action'] @@ -229,6 +230,7 @@ class AccessSystemAdmin(ModelAdmin): list_display = ['name', 'code', 'is_active', 'updated_at'] list_filter = [ActiveFilter] list_filter_sheet = False + list_filter_submit = True search_fields = ['name', 'code'] ordering = ['name'] fields = ['name', 'code', 'description', 'is_active']