[Answered ]-How to display one models data in another model django admin panel

1👍

Using the StackedInline to link two models is straight forward and a much clean practice, so basically this is my solution below:

class ContentInlineAdmin(admin.StackedInline):
    model = Content

@admin.register(SchoolProfile)
class SchoolProfileAdmin(admin.ModelAdmin):
    list_display = ('school_name',)
    inlines = [ContentInlineAdmin]

 
👤Godda

Leave a comment