def formset_factory(form, formset=BaseFormSet, extra=1, can_order=False, can_delete=False, max_num=None, validate_max=False, min_num=None, validate_min=False):
 if (min_num is None):
  min_num = DEFAULT_MIN_NUM
 if (max_num is None):
  max_num = DEFAULT_MAX_NUM
 absolute_max = (max_num + DEFAULT_MAX_NUM)
 attrs = {'form': form, 'extra': extra, 'can_order': can_order, 'can_delete': can_delete, 'min_num': min_num, 'max_num': max_num, 'absolute_max': absolute_max, 'validate_min': validate_min, 'validate_max': validate_max}
 return type((form.__name__ + 'FormSet'), (formset,), attrs)

def formset_factory ( form , formset = BaseFormSet , extra = 1 , can_order = False , can_delete = False , max_num = None , validate_max = False , min_num = None , validate_min = False ) : if ( min_num is None ) : min_num = DEFAULT_MIN_NUM if ( max_num is None ) : max_num = DEFAULT_MAX_NUM absolute_max = ( max_num + DEFAULT_MAX_NUM ) attrs = { 'form' : form , 'extra' : extra , 'can_order' : can_order , 'can_delete' : can_delete , 'min_num' : min_num , 'max_num' : max_num , 'absolute_max' : absolute_max , 'validate_min' : validate_min , 'validate_max' : validate_max } return type ( ( form . __name__ + 'FormSet' ) , ( formset , ) , attrs )
return a formset for the given form class .