How can I use a specific ModelForm as the form for my modelformset_factory?
I’m using django-form-utilities to have a BetterModelForm, and I would like to use that same form as the basis of my formset. I have thought that I could write my own custom factory that extends formset, but I was guessing there is an easier way
There is no need to extend native
modelformset_factory(). Look at the definition of this function in the django’s source code:You can just pass your custom modelform via
formparameter, but not the actual instance – you need to pass the form ref itself, so use ie. MyModelForm insted of MyModelForm().