Add is_default field to Showcase admin interface
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -14,13 +14,13 @@ from inventory.models import (
|
|||||||
# ===== SHOWCASE =====
|
# ===== SHOWCASE =====
|
||||||
@admin.register(Showcase)
|
@admin.register(Showcase)
|
||||||
class ShowcaseAdmin(admin.ModelAdmin):
|
class ShowcaseAdmin(admin.ModelAdmin):
|
||||||
list_display = ('name', 'warehouse', 'is_active', 'created_at')
|
list_display = ('name', 'warehouse', 'is_default', 'is_active', 'created_at')
|
||||||
list_filter = ('is_active', 'warehouse', 'created_at')
|
list_filter = ('is_active', 'is_default', 'warehouse', 'created_at')
|
||||||
search_fields = ('name', 'warehouse__name')
|
search_fields = ('name', 'warehouse__name')
|
||||||
date_hierarchy = 'created_at'
|
date_hierarchy = 'created_at'
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
('Основная информация', {
|
('Основная информация', {
|
||||||
'fields': ('name', 'warehouse', 'description', 'is_active')
|
'fields': ('name', 'warehouse', 'description', 'is_active', 'is_default')
|
||||||
}),
|
}),
|
||||||
('Даты', {
|
('Даты', {
|
||||||
'fields': ('created_at', 'updated_at'),
|
'fields': ('created_at', 'updated_at'),
|
||||||
|
|||||||
Reference in New Issue
Block a user