ItemImageFormSet = inlineformset_factory(Item, ItemImage, extra=5, max_num=5)
image_formset = ItemImageFormSet()
I use the above code to create an inline formset of images relating to an item. I need a way to add class name to the resultant html to decorate the presentation. For regular forms, I usually add class name in their respective __init__(), but that approach is not feasible for formsets. Is there a way to achieve my ask?
inlineformset_factory accepts a form argument, you can create your custom modelform and than send it to the factory