<commit_before>from django.contrib import admin

from .models import (
    Contest,
    Contestant,
    Performance,
)


@admin.register(Contest)
class ContestAdmin(admin.ModelAdmin):
    save_on_top = True


@admin.register(Contestant)
class ContestantAdmin(admin.ModelAdmin):
    save_on_top = True

    fields = (
        'name', (
            'website2',
            'facebook2',
        ),
        'phone', (
            'tenor',
            'lead',
            'baritone',
            'bass',
        ),
        'director',
        'district',
        'prelim',
        'picture',
    )

    readonly_fields = (
        'name',
        'district',
        'prelim',
    )

    search_fields = (
        'name',
    )

    list_display = (
        'name',
        'website2',
        'facebook2',
        'phone',
        'prelim',
    )

    list_filter = (
        'contestant_type',
    )


@admin.register(Performance)
class PerformanceAdmin(admin.ModelAdmin):
    save_on_top = True

    fields = (
        'contestant',<commit_msg>Adds ordering in admin<commit_after>from django.contrib import admin

from .models import (
    Contest,
    Contestant,
    Performance,
)


@admin.register(Contest)
class ContestAdmin(admin.ModelAdmin):
    save_on_top = True


@admin.register(Contestant)
class ContestantAdmin(admin.ModelAdmin):
    save_on_top = True

    fields = (
        'name', (
            'website2',
            'facebook2',
        ),
        'phone', (
            'tenor',
            'lead',
            'baritone',
            'bass',
        ),
        'director',
        'district',
        'prelim',
        'picture',
    )

    readonly_fields = (
        'name',
        'district',
        'prelim',
    )

    search_fields = (
        'name',
    )

    list_display = (
        'name',
        'website2',
        'facebook2',
        'phone',
        'prelim',
    )

    list_filter = (
        'contestant_type',
    )

    ordering = (
        'name',
    )


@admin.register(Performance)
class PerformanceAdmin(admin.ModelAdmin):
    save_on_top = True

    fields = (
        'contestant',
{'fraction_non_alphanumeric': 0.12376933895921238, 'fraction_numerical': 0.003750586029067042, 'mean_word_length': 1.634567901234568, 'pattern_counts': {'":': 0, '<': 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': '6793306', 'n_tokens_mistral': 693, 'n_tokens_neox': 657, 'n_words': 112}