I have created an inline formset which works exactly as I planned on the frontend side-
However I can’t seem to access any of the data- it seems like the form isn’t saving the data?
Here in the views.py you can see where it should be saving:
def formset_variantingredients_valid(self, formset):
variantingredients = formset.save(commit=False)
for variantingredient in variantingredients:
variantingredient.recipe = self.object
variantingredient.save()
def formset_images_valid(self, formset):
images = formset.save(commit=False)
for image in images:
image.recipe = self.object
image.save()
In the admin, in my saved form I can only see the standard fields that have saved and not either of these two inline formsets-
Is my issue in the saving of the form itself or am I just not accessing the data correctly?
Many Thanks for the help!