#NEWLINE# def formfield( self , form_class = forms . ModelChoiceField , **kwargs ) : #NEWLINE# #INDENT# defaults = { #NEWLINE# #INDENT# 'queryset' : self . to . _default_manager . complex_filter ( self . limit_choices_to ) , #NEWLINE# #UNINDENT# } #NEWLINE# defaults . update ( form_class ) #NEWLINE# return super ( ForeignKeyAttribute , self ) . formfield ( form_class = form_class , ** defaults )