#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# super ( LinkFormMixin , self ) . __init__ ( * args , ** name ) #NEWLINE# for ( name , field ) in self . get_link_form_fields ( ) : #NEWLINE# #INDENT# value = getattr ( self . instance , name , None ) #NEWLINE# model_field = get_link_field_from_model ( self . instance , name ) #NEWLINE# field . initial = ( get_composite_key ( value ) if value else None ) #NEWLINE# field . populate_choices ( model_field . get_choices_by_class ( ) )