RecipeFormset = inlineformset_factory(Recipe, RecipeIngredient, extra=len(
    recipe_ingredients), can_delete=False)
formset = RecipeFormset()
for subform, data in zip(formset.forms, recipe_ingredients):
    subform.initial = data
Initial Data for Django Inline Formsets