add article date field

This commit is contained in:
Tobias Brunner 2025-07-04 15:51:44 +02:00
parent 470887c34e
commit 6351da70ee
No known key found for this signature in database
6 changed files with 42 additions and 19 deletions

View file

@ -45,7 +45,7 @@ class ArticleAdmin(admin.ModelAdmin):
"image_preview",
"is_published",
"is_featured",
"created_at",
"article_date",
)
list_filter = (
"is_published",
@ -54,11 +54,12 @@ class ArticleAdmin(admin.ModelAdmin):
"related_service",
"related_consulting_partner",
"related_cloud_provider",
"created_at",
"article_date",
)
search_fields = ("title", "excerpt", "content", "meta_keywords")
prepopulated_fields = {"slug": ("title",)}
readonly_fields = ("created_at", "updated_at")
ordering = ("-article_date",)
def image_preview(self, obj):
"""Display image preview in admin list view"""