[Fixed]-Combining two django models into one form

1👍

Try this

from django.contrib import admin

class SubjectInline(admin.TabularInline):
    model = Subject

class TeacherAdmin(admin.ModelAdmin):
    inlines = [
        sublectInline,
    ]
admin.site.register(Teacher, TeacherAdmin)

Leave a comment