#NEWLINE# def get_kwargs_for_model( cls , obj , exclude = None ) : #NEWLINE# #INDENT# exclude = ( exclude or [ ] ) #NEWLINE# fields = [ ( field . name , field . to_python ) for field in cls . _meta . fields if ( field . name not in exclude ) ] #NEWLINE# kwargs = dict ( [ ( i , convert ( obj . get ( i ) ) ) for ( i , convert ) in fields ] ) #NEWLINE# return i