from django.contrib import admin
from .models import Course, Lesson


class LessonsInline(admin.TabularInline):
    model = Lesson


@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
    save_on_top = True
    inlines = LessonsInline,
    list_display = 'name', 'tutor'
    fields = 'name', 'tutor', 'description'

2d9d7f14d3ff774cc636b1274faa10367936abc9
<mask token>


@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
    save_on_top = True
    inlines = LessonsInline,
    list_display = 'name', 'tutor'
    fields = 'name', 'tutor', 'description'

<mask token>


class LessonsInline(admin.TabularInline):
    <mask token>


@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
    save_on_top = True
    inlines = LessonsInline,
    list_display = 'name', 'tutor'
    fields = 'name', 'tutor', 'description'

<mask token>


class LessonsInline(admin.TabularInline):
    model = Lesson


@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
    save_on_top = True
    inlines = LessonsInline,
    list_display = 'name', 'tutor'
    fields = 'name', 'tutor', 'description'

from django.contrib import admin
from .models import Course, Lesson


class LessonsInline(admin.TabularInline):
    model = Lesson


@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
    save_on_top = True
    inlines = LessonsInline,
    list_display = 'name', 'tutor'
    fields = 'name', 'tutor', 'description'
