Added PostAdmin and ReplyAdmin customizations

parent aa820f35
from django.contrib import admin
from .models import Post
from .models import Reply
class PostAdmin(admin.ModelAdmin):
model = Post
search_fields = ('post_title',)
list_display = ('post_title', 'pub_date',)
list_display = ('post_title', 'pub_date','author')
list_filter = ('post_title', 'pub_date',)
admin.site.register(Post, PostAdmin)
\ No newline at end of file
class ReplyAdmin(admin.ModelAdmin):
model = Reply
search_fields = ('post_title',)
list_display = ('post','pub_date','author')
list_filter = ('post','pub_date','author')
admin.site.register(Post, PostAdmin)
admin.site.register(Reply, ReplyAdmin)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment