<commit_before>from django.contrib import admin
from .models import Appointment, MessageTemplate, ScheduledMessage

@admin.register(Appointment)
class AppointmentAdmin(admin.ModelAdmin):
    search_fields = ('time', 'client_last_name', 'client_phone')
    list_display = ('time', 'client_last_name', 'client_phone', 'counselor_name')
    def counselor_name(self, obj):
        return obj.counselor.name
    counselor_name.short_description = 'Counselor'

@admin.register(ScheduledMessage)
class ScheduledMessageAdmin(admin.ModelAdmin):
    list_display = ('time', 'client_name', 'message_title')
    def client_name(self, obj):
        return obj.appointment.client_name
    def message_title(self, obj):
        return obj.message.title
    client_name.short_description = 'Client'
    message_title.short_description = 'Message'
    pass

@admin.register(MessageTemplate)
class MessageTemplateAdmin(admin.ModelAdmin):
    pass
<commit_msg>fix scheduled message admin view<commit_after>from django.contrib import admin
from .models import Appointment, MessageTemplate, ScheduledMessage

@admin.register(Appointment)
class AppointmentAdmin(admin.ModelAdmin):
    search_fields = ('time', 'client_last_name', 'client_phone')
    list_display = ('time', 'client_last_name', 'client_phone', 'counselor_name')
    def counselor_name(self, obj):
        return obj.counselor.name
    counselor_name.short_description = 'Counselor'

@admin.register(ScheduledMessage)
class ScheduledMessageAdmin(admin.ModelAdmin):
    list_display = ('time', 'client_name', 'message_title')
    def client_name(self, obj):
        return "{0} {1}".format(
            obj.appointment.client_first_name, obj.appointment.client_last_name)
    def message_title(self, obj):
        return obj.message.title
    client_name.short_description = 'Client'
    message_title.short_description = 'Message'
    pass

@admin.register(MessageTemplate)
class MessageTemplateAdmin(admin.ModelAdmin):
    pass

{'fraction_non_alphanumeric': 0.10446247464503043, 'fraction_numerical': 0.0010141987829614604, 'mean_word_length': 5.146417445482866, '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': '3075999', 'n_tokens_mistral': 588, 'n_tokens_neox': 575, 'n_words': 117}