1from django.contrib import admin
2from .models import Post
3
4class PostAdmin(admin.ModelAdmin):
5 list_display = ('title', 'slug', 'status','created_on')
6 list_filter = ("status",)
7 search_fields = ['title', 'content']
8 prepopulated_fields = {'slug': ('title',)}
9
10admin.site.register(Post, PostAdmin)