This commit is contained in:
IGNY8 VPS (Salman)
2025-11-29 19:50:22 +00:00
parent 302e14196c
commit 492a83ebcb
4 changed files with 569 additions and 294 deletions

View File

@@ -91,7 +91,7 @@ class ContentAdmin(SiteSectorAdminMixin, admin.ModelAdmin):
search_fields = ['title', 'content_html', 'external_url']
ordering = ['-created_at']
readonly_fields = ['created_at', 'updated_at', 'word_count']
filter_horizontal = ['taxonomy_terms'] # Add many-to-many widget for taxonomy terms
# Note: taxonomy_terms removed from filter_horizontal because it uses a through model
fieldsets = (
('Basic Info', {
@@ -100,10 +100,8 @@ class ContentAdmin(SiteSectorAdminMixin, admin.ModelAdmin):
('Content Classification', {
'fields': ('content_type', 'content_structure', 'source')
}),
('Taxonomy Terms (Tags & Categories)', {
'fields': ('taxonomy_terms',),
'description': 'Select tags and categories for this content'
}),
# Note: taxonomy_terms field removed from fieldsets because it uses ContentTaxonomyAssociation through model
# Taxonomy associations can be managed via the inline admin or separately
('Content', {
'fields': ('content_html', 'word_count')
}),