<commit_before>from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline

from import_export.admin import ExportMixin

from .models import AdditionalSpeaker, TalkProposal, TutorialProposal
from .resources import TalkProposalResource


class AdditionalSpeakerInline(GenericTabularInline):
    model = AdditionalSpeaker
    fields = ['user', 'status', 'cancelled']
    ct_field = 'proposal_type'
    ct_fk_field = 'proposal_id'
    extra = 0


class ProposalAdmin(admin.ModelAdmin):
    list_display = [
        'title', 'category', 'duration', 'language',
        'python_level', 'accepted',
        'python_level', 'remoting_policy', 'accepted',
    ]
    list_filter = [
        'cancelled', 'accepted',
        'category', 'duration', 'language', 'python_level',
    ]
    fields = [
        'conference', 'submitter', 'title', 'category', 'duration',
        'language', 'abstract', 'python_level', 'objective',
        'detailed_description', 'outline', 'supplementary',
        'recording_policy', 'slide_link', 'referring_policy', 'cancelled',
        'recording_policy', 'slide_link', 'referring_policy', 'remoting_policy', 'cancelled',
        'accepted', 'slido_embed_link',
    ]
    raw_id_fields = ['submitter']
    search_fields = ['title', 'abstract']
    inlines = [AdditionalSpeakerInline]


@admin.register(TalkProposal)
class TalkProposalAdmin(ExportMixin, ProposalAdmin):
    resource_class = TalkProposalResource


@admin.register(TutorialProposal)
class TutorialProposalAdmin(ProposalAdmin):
    pass
<commit_msg>fix admin.py field eroor<commit_after>from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline

from import_export.admin import ExportMixin

from .models import AdditionalSpeaker, TalkProposal, TutorialProposal
from .resources import TalkProposalResource


class AdditionalSpeakerInline(GenericTabularInline):
    model = AdditionalSpeaker
    fields = ['user', 'status', 'cancelled']
    ct_field = 'proposal_type'
    ct_fk_field = 'proposal_id'
    extra = 0


class ProposalAdmin(admin.ModelAdmin):
    list_display = [
        'title', 'category', 'duration', 'language',
        'python_level', 'remoting_policy', 'accepted',
    ]
    list_filter = [
        'cancelled', 'accepted',
        'category', 'duration', 'language', 'python_level',
    ]
    fields = [
        'conference', 'submitter', 'title', 'category', 'duration',
        'language', 'abstract', 'python_level', 'objective',
        'detailed_description', 'outline', 'supplementary',
        'recording_policy', 'slide_link', 'referring_policy', 'remoting_policy', 'cancelled',
        'accepted', 'slido_embed_link',
    ]
    raw_id_fields = ['submitter']
    search_fields = ['title', 'abstract']
    inlines = [AdditionalSpeakerInline]


@admin.register(TalkProposal)
class TalkProposalAdmin(ExportMixin, ProposalAdmin):
    resource_class = TalkProposalResource


@admin.register(TutorialProposal)
class TutorialProposalAdmin(ProposalAdmin):
    pass
{'fraction_non_alphanumeric': 0.12094395280235988, 'fraction_numerical': 0.0006555227794165847, 'mean_word_length': 4.509025270758123, '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': '4589213', 'n_tokens_mistral': 921, 'n_tokens_neox': 902, 'n_words': 189}