text: from django.contrib import admin
  
  from .models import Post, Group, Comment, Follow
  
  
  class PostAdmin(admin.ModelAdmin):
      list_display = ('pk', 'text', 'pub_date', 'author', 'group',)
      list_editable = ('group',)
      search_fields = ('text',)
      list_filter = ('pub_date',)
      empty_value_display = '-пусто-'
  
  
  class GroupAdmin(admin.ModelAdmin):
      list_display = ('title', 'slug', 'description')
  
  
  class CommentAdmin(admin.ModelAdmin):
      list_display = ('pk', 'post', 'author', 'text', 'created',)
  
  
  class FollowAdmin(admin.ModelAdmin):
      list_display = ('user', 'author',)
  
  
  admin.site.register(Post, PostAdmin)
  admin.site.register(Group, GroupAdmin)
  admin.site.register(Comment, CommentAdmin)
  admin.site.register(Follow, FollowAdmin)
  