one-to-many inline select with django admin

There is! You want InlineModelAdmin (see InlineModelAdmin documentation here)

Sample code in brief:

class StudentAdminInline(admin.TabularInline):
    model = Student

class ClassAdmin(admin.ModelAdmin):
    inlines = (StudentAdminInline, )
admin.site.register(Class, ClassAdmin)

Leave a Comment

tech