mirror of
https://github.com/Mistake35/Cedar-Django.git
synced 2026-07-17 16:11:14 +10:00
Comments show when editing a post in the admin panel.
h
This commit is contained in:
@@ -85,7 +85,14 @@ class ConversationAdmin(admin.ModelAdmin):
|
||||
search_fields = ('id', )
|
||||
raw_id_fields = ('source', 'target', )
|
||||
|
||||
class CommentsInline(admin.TabularInline):
|
||||
model = models.Comment
|
||||
extra = 0
|
||||
fields = ('creator', 'body', 'is_rm')
|
||||
raw_id_fields = ('creator',)
|
||||
|
||||
class PostAdmin(admin.ModelAdmin):
|
||||
inlines = [CommentsInline]
|
||||
raw_id_fields = ('creator', 'poll', )
|
||||
search_fields = ('id', 'body', 'creator__username', )
|
||||
list_display = ('id', 'creator', 'body', 'is_rm', )
|
||||
|
||||
Reference in New Issue
Block a user