from django.contrib import admin

from .models import Bill, Organization


@admin.register(Bill)
class BillAdmin(admin.ModelAdmin):
    list_display = ['name', 'due', 'amount']
    list_filter = ('name', 'type', 'is_paid', 'is_overdue', 'is_missed')
    search_fields = ['name', 'type', 'amount']


@admin.register(Organization)
class Organization(admin.ModelAdmin):
    list_display = ['name']
    search_fields = ['name']
    list_filter = ('name',)
    ordering = ['name']
    # prepopulated_fields = {'slug': ('name',)}
    # raw_id_fields = ('members',)
    # readonly_fields = ('members',)
