<commit_before>from django.contrib import admin

from .models import (
    StaffMember, MentorshipPreferences, MentorshipRelationship,
    Invitation, Meeting, MeetingAttendance, TrainingEvent
)

class StaffMemberAdmin(admin.ModelAdmin):
    list_display = ('crsid', 'full_name', 'division', 'is_active',
                    'arrived_on', 'departed_on', 'expected_departure_on')

    list_filter = ('arrived_on', 'departed_on', 'expected_departure_on')

    def get_queryset(self, request):
        return StaffMember.objects.get_queryset()

    def crsid(self, obj):
        return obj.user.username

    def full_name(self, obj):
        return obj.user.get_full_name()

class MentorshipRelationshipAdmin(admin.ModelAdmin):
    list_display = ('description', 'mentor_crsid',
                    'mentee_crsid', 'is_active',
                    'started_on', 'ended_on')

    def mentor_crsid(self, obj):<commit_msg>Allow filering by is_active in admin site for StaffMember<commit_after>from django.contrib import admin

from .models import (
    StaffMember, MentorshipPreferences, MentorshipRelationship,
    Invitation, Meeting, MeetingAttendance, TrainingEvent
)

class StaffMemberAdmin(admin.ModelAdmin):
    list_display = ('crsid', 'full_name', 'division', 'is_active',
                    'arrived_on', 'departed_on', 'expected_departure_on')

    list_filter = ('is_active', 'arrived_on', 'departed_on',
                   'expected_departure_on')

    def get_queryset(self, request):
        return StaffMember.objects.get_queryset()

    def crsid(self, obj):
        return obj.user.username

    def full_name(self, obj):
        return obj.user.get_full_name()

class MentorshipRelationshipAdmin(admin.ModelAdmin):
    list_display = ('description', 'mentor_crsid',
                    'mentee_crsid', 'is_active',
                    'started_on', 'ended_on')

    def mentor_crsid(self, obj):
{'fraction_non_alphanumeric': 0.10732984293193717, 'fraction_numerical': 0.0, 'mean_word_length': 3.517730496453901, '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': '1412168', 'n_tokens_mistral': 593, 'n_tokens_neox': 577, 'n_words': 118}