<commit_before>from django.contrib import admin
from django.utils.translation import gettext_lazy as _

from diventi.core.admin import DiventiTranslationAdmin, make_published, make_unpublished, deactivate

from .models import Article, ArticleCategory, BlogCover


class ArticleAdmin(DiventiTranslationAdmin):
    list_display = ['title', 'category', 'image_tag', 'hot', 'published', 'publication_date']
    readonly_fields = ['created', 'modified', 'publication_date']
    prepopulated_fields = {"slug": ("title",)} 
    fieldsets = (
        (_('Management'), {
            'fields': ('published', 'hot')
        }),
        (_('Editing'), {
            'fields': ('title', 'category', 'image', 'publication_date', 'description', 'content', 'label', 'author', 'slug'),
        }),
    )
    actions = [make_published, make_unpublished]


class BlogCoverAdmin(DiventiTranslationAdmin):
    list_display= ('label', 'image_tag', 'active')
    actions = [deactivate]


class CategoryAdmin(DiventiTranslationAdmin):
    list_display = ('title',)<commit_msg>Updated admin blog layout.<commit_after>from django.contrib import admin
from django.utils.translation import gettext_lazy as _

from diventi.core.admin import DiventiTranslationAdmin, make_published, make_unpublished, deactivate

from .models import Article, ArticleCategory, BlogCover


class ArticleAdmin(DiventiTranslationAdmin):
    list_display = ['title', 'category', 'image_tag', 'hot', 'published', 'publication_date']
    readonly_fields = ['created', 'modified', 'publication_date']
    prepopulated_fields = {"slug": ("title",)} 
    fieldsets = (
        (_('Management'), {
            'fields': ('published', 'hot')
        }),
        (_('Editing'), {
            'fields': ('title', 'category', 'image', 'description', 'content', 'label', 'author', 'slug', 'publication_date'),
        }),
    )
    actions = [make_published, make_unpublished]


class BlogCoverAdmin(DiventiTranslationAdmin):
    list_display= ('label', 'image_tag', 'active')
    actions = [deactivate]


class CategoryAdmin(DiventiTranslationAdmin):
    list_display = ('title',)
{'fraction_non_alphanumeric': 0.1458235016517225, 'fraction_numerical': 0.0, 'mean_word_length': 4.535248041775457, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4472739', 'n_tokens_mistral': 594, 'n_tokens_neox': 584, 'n_words': 140}