# Register your models here.
from django.contrib import admin

from .models import SimpleTask, SimpleList


@admin.register(SimpleList)
class SimpleListAdmin(admin.ModelAdmin):
    list_display = [
        "title",
        "user",
        "created",
    ]
    list_filter = [
        "user",
    ]
    search_fields = [
        "title",
    ]


@admin.register(SimpleTask)
class SimpleTaskAdmin(admin.ModelAdmin):
    date_hierarchy = "deadline"
    list_display = [
        "title",
        "deadline",
        "created",
        "list",
        "done",
    ]
    list_filter = [
        "list",
        "done",
    ]
    search_fields = [
        "title",
        "text",
    ]
