#NEWLINE# def __init__( self , data = None , files = None , auto_id = 'id_%s' , prefix = None , initial = None , error_class = ErrorList , label_suffix = ':' , empty_permitted = False , instance = None ) : #NEWLINE# #INDENT# opts = self . _meta #NEWLINE# if ( instance is None ) : #NEWLINE# #INDENT# if ( opts . document is None ) : #NEWLINE# #INDENT# raise ValueError ( 'A document class must be provided.' ) #NEWLINE# #UNINDENT# self . instance = opts . document #NEWLINE# object_data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . instance = instance #NEWLINE# object_data = document_to_dict ( instance , opts . fields , opts . exclude ) #NEWLINE# #UNINDENT# if ( initial is not None ) : #NEWLINE# #INDENT# object_data . update ( initial ) #NEWLINE# #UNINDENT# self . _validate_unique = False #NEWLINE# super ( BaseDocumentForm , self ) . __init__ ( data , files , auto_id , prefix , object_data , error_class , label_suffix , empty_permitted )