#NEWLINE# def process_all_forms( self , form ) : #NEWLINE# #INDENT# '\n        This validates both the ProductClass form and the\n        ProductClassAttributes formset at once\n        making it possible to display all their errors at once.\n        ' #NEWLINE# if ( self . creating and form . is_valid ( ) ) : #NEWLINE# #INDENT# self . object = form . save ( commit = False ) #NEWLINE# #UNINDENT# attributes_formset = self . product_attributes_formset ( self . request . POST , self . request . FILES , instance = form . object ) #NEWLINE# is_valid = ( form . is_valid ( ) and attributes_formset . is_valid ( ) ) #NEWLINE# if is_valid : #NEWLINE# #INDENT# return self . forms_valid ( form , attributes_formset ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . forms_invalid ( form , attributes_formset )