from django.contrib import admin

from .models import PostImages


@admin.register(PostImages)
class PostImagesAdmin(admin.ModelAdmin):
    list_display = (
        'id',
        'title',
        'path',
        'processed_path',
        'original_filename',
        'format',
        'width',
        'height',
        'size',
        'quality',
        'slug',
        'created_at',
        'updated_at',
        'is_active',
        'is_front',
    )
    list_filter = ('created_at', 'updated_at', 'is_active', 'is_front')
    search_fields = ('slug',)
    date_hierarchy = 'created_at'