[Answered ]-Django Admin Inline objects

2👍

See: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects

class AnswerInlineAdmin(admin.StackedInline):
    model = Answer
    extra = 1

class QuestionAdmin(admin.ModelAdmin):
    ...
    inlines = [AnswerInlineAdmin]

Leave a comment