Unfortunately I don’t have any samples I can supply, just some more notes that I hope will help.
-
Suggestion - since the output of
modelformset_factory
is a Class, your first identifier you’re creating could be MatchFormset instead of match_formset. (It’ll help avoid confusion).- Then, your second call becomes match_formset = MatchFormset(…)
-
You need to add that formset instance as a field within the form:
- See the section Accessing the fields from the form in the Forms API docs
- Also see the discussion at Dynamically add a field to a model form - #14 by KenWhitesell
Let’s say that you’ve named that field match_formset
. Since that variable is now another field in the form, it would be rendered in your form as form.match_formset. How that formset gets rendered depends upon the formset and the underlying form being replicated.