#NEWLINE# def add_to_serialize_list( objs ) : #NEWLINE# #INDENT# for obj in objs : #NEWLINE# #INDENT# if ( obj is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( not hasattr ( obj , '_meta' ) ) : #NEWLINE# #INDENT# add_to_serialize_list ( obj ) #NEWLINE# continue #NEWLINE# #UNINDENT# if obj . _meta . proxy : #NEWLINE# #INDENT# obj = obj . _meta . proxy_for_model . objects . get ( pk = obj . pk ) #NEWLINE# #UNINDENT# model_name = getattr ( obj . _meta , 'model_name' , getattr ( obj . _meta , 'module_name' , None ) ) #NEWLINE# key = ( '%s:%s:%s' % ( key . _meta . app_label , model_name , obj . pk ) ) #NEWLINE# if ( key not in seen ) : #NEWLINE# #INDENT# serialize_me . append ( obj ) #NEWLINE# seen [ key ] = 1