#NEWLINE# def _construct_form( self , i , **kwargs ) : #NEWLINE# #INDENT# defaults = { #NEWLINE# #INDENT# 'parent_document' : self . parent_document , #NEWLINE# #UNINDENT# } #NEWLINE# emb_list = getattr ( self . parent_document , self . form . _meta . embedded_field ) #NEWLINE# if ( ( emb_list is not None ) and ( len ( emb_list ) > i ) ) : #NEWLINE# #INDENT# defaults [ 'position' ] = kwargs #NEWLINE# #UNINDENT# defaults . update ( kwargs ) #NEWLINE# form = super ( EmbeddedDocumentFormSet , self ) . _construct_form ( i , ** defaults ) #NEWLINE# return form