<commit_before>import logging
log = logging.getLogger(__name__)

from rest_framework import (
    # mixins,
    viewsets,
    # filters,
)

from django.contrib.auth import get_user_model

from .models import (
    Convention,
    Contest,
    Group,
    Contestant,
    Performance,
    # Note,
)

from .filters import (
    PerformanceFilter,
    GroupFilter,
)


from .serializers import (
    ConventionSerializer,
    ContestSerializer,
    GroupSerializer,
    ContestantSerializer,
    PerformanceSerializer,
    NoteSerializer,
    UserSerializer,
)

User = get_user_model()


class ConventionViewSet(viewsets.ModelViewSet):
    queryset = Convention.objects.filter(
        is_active=True,
    ).prefetch_related(
        'contests',
        # 'contests__contestants__group',
        # 'contests__contestants__group__contestants',
        # 'contests__contestants__performances',
        # 'contests__contestants__group__lead',
        # 'contests__contestants__group__tenor',
        # 'contests__contestants__group__baritone',
        # 'contests__contestants__group__bass',
    )
    serializer_class = ConventionSerializer
    lookup_field = 'slug'


class ContestViewSet(viewsets.ModelViewSet):
    queryset = Contest.objects.filter(
        is_active=True,
    ).prefetch_related(
        'district',<commit_msg>Remove REST filter<commit_after>import logging
log = logging.getLogger(__name__)

from rest_framework import (
    # mixins,
    viewsets,
    # filters,
)

from django.contrib.auth import get_user_model

from .models import (
    Convention,
    Contest,
    Group,
    Contestant,
    Performance,
    # Note,
)

from .filters import (
    PerformanceFilter,
    GroupFilter,
)


from .serializers import (
    ConventionSerializer,
    ContestSerializer,
    GroupSerializer,
    ContestantSerializer,
    PerformanceSerializer,
    NoteSerializer,
    UserSerializer,
)

User = get_user_model()


class ConventionViewSet(viewsets.ModelViewSet):
    queryset = Convention.objects.filter(
        is_active=True,
    ).prefetch_related(
        'contests',
        # 'contests__contestants__group',
        # 'contests__contestants__group__contestants',
        # 'contests__contestants__performances',
        # 'contests__contestants__group__lead',
        # 'contests__contestants__group__tenor',
        # 'contests__contestants__group__baritone',
        # 'contests__contestants__group__bass',
    )
    serializer_class = ConventionSerializer
    lookup_field = 'slug'


class ContestViewSet(viewsets.ModelViewSet):
    queryset = Contest.objects.all(
        # is_active=True,
    ).prefetch_related(
        'district',
{'fraction_non_alphanumeric': 0.08245481927710843, 'fraction_numerical': 0.0, 'mean_word_length': 3.370065789473684, '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': '1520356', 'n_tokens_mistral': 811, 'n_tokens_neox': 801, 'n_words': 131}