<commit_before>from django.contrib import admin

# Register your models here.
from .models import (
    Course, Announcement, Comment, Enrollment, Lesson, Material
)


class CourseAdmin(admin.ModelAdmin):
    list_display = ['name', 'slug', 'start_date', 'created_at']
    search_fields = ['name', 'slug']
    prepopulated_fields = {'slug': ['name']}


class MaterialInlineAdmin(admin.StackedInline):

    model = Material


class LessonAdmin(admin.ModelAdmin):
    list_display = ['name', 'number', 'course', 'release_date']
    search_fields = ['name', 'description']
    list_filter = ['created_at']

    inlines = [
        MaterialInlineAdmin
    ]

admin.site.register(Course, CourseAdmin)
admin.site.register([Enrollment, Announcement, Comment, Material])
admin.site.register(Lesson, LessonAdmin)<commit_msg>Add new classes in admin<commit_after>from django.contrib import admin

# Register your models here.
from .models import (
    Course,
    CourseTRB,
    Announcement,
    Comment,
    Enrollment,
    Lesson,
    LessonTRB,
    Material,
    KnowledgeLevel,
    CategoryDimensionCognitiveProcess,
    Verb,
)


class CourseAdmin(admin.ModelAdmin):
    list_display = ['name', 'slug', 'start_date', 'created_at']
    search_fields = ['name', 'slug']
    prepopulated_fields = {'slug': ['name']}


class CourseTRBAdmin(CourseAdmin):
    pass


class MaterialInlineAdmin(admin.StackedInline):

    model = Material


class LessonAdmin(admin.ModelAdmin):
    list_display = ['name', 'number', 'course', 'release_date']
    search_fields = ['name', 'description']
    list_filter = ['created_at']

    inlines = [
        MaterialInlineAdmin
    ]


admin.site.register(Course, CourseAdmin)
admin.site.register(CourseTRB, CourseTRBAdmin)
admin.site.register([Enrollment, Announcement, Comment, Material])
admin.site.register(Lesson, LessonAdmin)
admin.site.register(LessonTRB, LessonAdmin)
admin.site.register(KnowledgeLevel)
admin.site.register(CategoryDimensionCognitiveProcess)
admin.site.register(Verb)
{'fraction_non_alphanumeric': 0.12251984126984126, 'fraction_numerical': 0.0, 'mean_word_length': 4.713881019830028, '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': '1434244', 'n_tokens_mistral': 625, 'n_tokens_neox': 622, 'n_words': 130}