I’m trying to edit a form with a ImageField and I´m using modelformset_factory
in my views :
ModelFormSet = modelformset_factory(Model, max_num=0,)
if request.method == 'POST':
formset = MyFormSet(request.POST, request.FILES, queryset=Model.objects.filter(pk=2))
if formset.is_valid():
formset.save()
but it doesn´t work, any advice? thanks!
the code is fine, just missed placing to put on html tag enctype=”multipart/form-data” on html form…that was the problem