#NEWLINE# def documentformset_factory( document , form = DocumentForm , formfield_callback = None , formset = BaseDocumentFormSet , extra = 1 , can_delete = False , can_order = False , max_num = None , fields = None , exclude = None ) : #NEWLINE# #INDENT# '\n    Returns a FormSet class for the given Django model class.\n    ' #NEWLINE# form = documentform_factory ( document , form = form , fields = fields , exclude = exclude , formfield_callback = formfield_callback ) #NEWLINE# FormSet = formset_factory ( form , formset , extra = extra , max_num = max_num , can_order = can_order , can_delete = can_delete ) #NEWLINE# FormSet . model = document #NEWLINE# FormSet . document = document #NEWLINE# return FormSet