#NEWLINE# def __init__( self , data = None , files = None , instance = None , save_as_new = None , prefix = None , queryset = None , **kwargs ) : #NEWLINE# #INDENT# opts = self . model . _meta #NEWLINE# self . instance = save_as_new #NEWLINE# self . rel_name = '-' . join ( ( opts . app_label , opts . model_name , self . ct_field . name , self . ct_fk_field . name ) ) #NEWLINE# if ( ( self . instance is None ) or ( self . instance . pk is None ) ) : #NEWLINE# #INDENT# qs = self . model . _default_manager . none ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( queryset is None ) : #NEWLINE# #INDENT# queryset = self . model . _default_manager #NEWLINE# #UNINDENT# qs = queryset . filter ( ** { #NEWLINE# #INDENT# self . ct_field . name : ContentType . objects . get_for_model ( self . instance , for_concrete_model = self . for_concrete_model ) , #NEWLINE# self . ct_fk_field . name : self . instance . pk , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# super ( BaseGenericInlineFormSet , self ) . __init__ ( queryset = qs , data = data , files = files , prefix = prefix , ** kwargs )