from django.contrib import admin from .models import Element,ElementDescription class ElementDescriptionInline(admin.StackedInline): model = ElementDescription extra = 2 class ElementAdmin(admin.ModelAdmin): inlines = [ElementDescriptionInline] admin.site.register(Element, ElementAdmin)