From cd037e8f6b6c0b4f661582430833f6a304a0b290 Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Thu, 20 Nov 2025 12:10:04 +0300 Subject: [PATCH] Add is_default field to Showcase admin interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add is_default to list_display and list_filter - Include is_default in fieldsets for editing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- myproject/inventory/admin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/myproject/inventory/admin.py b/myproject/inventory/admin.py index 035ac91..97b3ea1 100644 --- a/myproject/inventory/admin.py +++ b/myproject/inventory/admin.py @@ -14,13 +14,13 @@ from inventory.models import ( # ===== SHOWCASE ===== @admin.register(Showcase) class ShowcaseAdmin(admin.ModelAdmin): - list_display = ('name', 'warehouse', 'is_active', 'created_at') - list_filter = ('is_active', 'warehouse', 'created_at') + list_display = ('name', 'warehouse', 'is_default', 'is_active', 'created_at') + list_filter = ('is_active', 'is_default', 'warehouse', 'created_at') search_fields = ('name', 'warehouse__name') date_hierarchy = 'created_at' fieldsets = ( ('Основная информация', { - 'fields': ('name', 'warehouse', 'description', 'is_active') + 'fields': ('name', 'warehouse', 'description', 'is_active', 'is_default') }), ('Даты', { 'fields': ('created_at', 'updated_at'),