-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
I have a following setup:
SessionWizardView
|_MultiForm (Step 1)
|_forms.Form
|_forms.ModelForm
|_forms.BaseFormSet
|_ Step 2
...
It sort of works, but I had to do one tweak on the forms.BaseFormSet:
@forms.BaseFormSet.cleaned_data.setter
def cleaned_data(self, value):
# this setter is needed, because MultiForm sets cleaned_data during
# vallidation and it's not defined on BaseFormSet by default in Django 1.8
for i, data in enumerate(value):
self.forms[i].cleaned_data = data
because MultiForm sets the cleaned_data during its own cleaning.
The other issue I'm having is during tests. When I use
response = self.client.get(reverse(<SessionWizardView>))
then it's quite a digging, to get all the form data (management_form of the BaseFormSet). Would it be possible to make using BaseFormSet with MultiForm easier? I haven't checked the code, so I don't know myself, what would be needed.
Metadata
Metadata
Assignees
Labels
No labels