text: from django.contrib import admin
  
  from .models import Category, Comment, Genre, Review, Title
  
  
  class GenreAdmin(admin.ModelAdmin):
      list_display = ("id", "name", "slug")
      search_fields = ("name",)
      list_filter = ("slug",)
      empty_value_display = "-пусто-"
  
  
  class CategoryAdmin(admin.ModelAdmin):
      list_display = ("id", "name", "slug")
      search_fields = ("name",)
      list_filter = ("slug",)
      empty_value_display = "-пусто-"
  
  
  class TitleAdmin(admin.ModelAdmin):
      list_display = (
          "id",
          "name",
          "year",
          "description",
          "rating",
          "category",
      )
      search_fields = ("name",)
      list_filter = ("name",)
      empty_value_display = "-пусто-"
  
  
  class ReviewAdmin(admin.ModelAdmin):
      list_display = ("id", "text", "author", "score", "pub_date")
      search_fields = ("text",)
      list_filter = ("pub_date",)
      empty_value_display = "-пусто-"
  
  
  class CommentAdmin(admin.ModelAdmin):
      list_display = ("id", "review", "text", "author", "pub_date")
      search_fields = ("text",)
      list_filter = ("pub_date",)
      empty_value_display = "-пусто-"
  
  
  admin.site.register(Review, ReviewAdmin)
  admin.site.register(Comment, CommentAdmin)
  admin.site.register(Category, CategoryAdmin)
  admin.site.register(Genre, GenreAdmin)
  admin.site.register(Title, TitleAdmin)
  