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