from django.contrib import admin from models import ModelBox, ModelSort, ModelExtraButton class ButtonsInline(admin.StackedInline): model = ModelExtraButton extra = 2 class ModelBoxAdmin(admin.ModelAdmin): inlines = [ButtonsInline] admin.site.register(ModelBox, ModelBoxAdmin) admin.site.register(ModelSort) admin.site.register(ModelExtraButton)