add article date field
This commit is contained in:
parent
470887c34e
commit
6351da70ee
6 changed files with 42 additions and 19 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue