I have the following admin setup so that I can add/edit a user and their profile at the same time.
class ProfileInline(admin.StackedInline):
\"\"\"
You need to set min_num in inline and validate_min in formset.
https://docs.djangoproject.com/en/1.8/topics/forms/formsets/#validate-min
class SomeInline(admin.TabularInline):
...
min_num = 1
def get_formset(self, request, obj=None, **kwargs):
formset = super().get_formset(request, obj=None, **kwargs)
formset.validate_min = True
return formset