def process_all_forms(self, form):
        if self.creating and form.is_valid():
            # the object will be needed by the product_attributes_formset
            self.object = form.save(commit=False)

        attributes_formset = self.product_attributes_formset(
            self.request.POST, self.request.FILES, instance=self.object)

        is_valid = form.is_valid() and attributes_formset.is_valid()

        if is_valid:
            return self.forms_valid(form, attributes_formset)
        else:
            return self.forms_invalid(form, attributes_formset)
This validates both the ProductClass form and the
dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/apps/dashboard/catalogue/views.py/ProductClassCreateUpdateView.process_all_forms