from django.contrib import admin
from .models import Comment, Post, Category, like


class PostAdmin(admin.ModelAdmin):
    list_display = ['title', 'created', 'status']
    list_filter = ['title', 'created', 'status']
    search_fields = ['title', 'description']
    prepopulated_fields = {'slug': ('title',)}


admin.site.register(Post, PostAdmin)


class CategoryAdmin(admin.ModelAdmin):
    search_fields = ['name']
    prepopulated_fields = {'slug': ('name',)}


admin.site.register(Category, CategoryAdmin)
admin.site.register(Comment)
admin.site.register(like)

2f9f827b2b73ce22ce861c3f8ae23d703e3919cf
<mask token>


class PostAdmin(admin.ModelAdmin):
    <mask token>
    <mask token>
    <mask token>
    <mask token>


<mask token>


class CategoryAdmin(admin.ModelAdmin):
    search_fields = ['name']
    prepopulated_fields = {'slug': ('name',)}


<mask token>

<mask token>


class PostAdmin(admin.ModelAdmin):
    list_display = ['title', 'created', 'status']
    list_filter = ['title', 'created', 'status']
    search_fields = ['title', 'description']
    prepopulated_fields = {'slug': ('title',)}


<mask token>


class CategoryAdmin(admin.ModelAdmin):
    search_fields = ['name']
    prepopulated_fields = {'slug': ('name',)}


<mask token>

<mask token>


class PostAdmin(admin.ModelAdmin):
    list_display = ['title', 'created', 'status']
    list_filter = ['title', 'created', 'status']
    search_fields = ['title', 'description']
    prepopulated_fields = {'slug': ('title',)}


admin.site.register(Post, PostAdmin)


class CategoryAdmin(admin.ModelAdmin):
    search_fields = ['name']
    prepopulated_fields = {'slug': ('name',)}


admin.site.register(Category, CategoryAdmin)
admin.site.register(Comment)
admin.site.register(like)

from django.contrib import admin
from .models import Comment, Post, Category, like


class PostAdmin(admin.ModelAdmin):
    list_display = ['title', 'created', 'status']
    list_filter = ['title', 'created', 'status']
    search_fields = ['title', 'description']
    prepopulated_fields = {'slug': ('title',)}


admin.site.register(Post, PostAdmin)


class CategoryAdmin(admin.ModelAdmin):
    search_fields = ['name']
    prepopulated_fields = {'slug': ('name',)}


admin.site.register(Category, CategoryAdmin)
admin.site.register(Comment)
admin.site.register(like)
