This commit is contained in:
@@ -153,10 +153,11 @@ class TopicAdmin(ModelAdmin):
|
||||
|
||||
@admin.register(Reply)
|
||||
class ReplyAdmin(ModelAdmin):
|
||||
list_display = ('short_content', 'topic', 'author', 'created_at')
|
||||
list_filter = ('created_at',)
|
||||
list_display = ('short_content', 'topic', 'author', 'is_pinned', 'created_at')
|
||||
list_filter = ('is_pinned', 'created_at')
|
||||
search_fields = ('content', 'author__nickname', 'topic__title')
|
||||
autocomplete_fields = ['author', 'topic', 'reply_to']
|
||||
list_editable = ('is_pinned',)
|
||||
inlines = [TopicMediaInline]
|
||||
|
||||
fieldsets = (
|
||||
@@ -164,7 +165,7 @@ class ReplyAdmin(ModelAdmin):
|
||||
'fields': ('topic', 'reply_to', 'content')
|
||||
}),
|
||||
('发布信息', {
|
||||
'fields': ('author', 'created_at')
|
||||
'fields': ('author', 'is_pinned', 'created_at')
|
||||
}),
|
||||
)
|
||||
readonly_fields = ('created_at',)
|
||||
|
||||
Reference in New Issue
Block a user