#NEWLINE# def deserialize_field( self , source , field_name ) : #NEWLINE# #INDENT# method_name = 'deserialize_{0}' . format ( field_name ) #NEWLINE# if hasattr ( self , typ ) : #NEWLINE# #INDENT# return getattr ( self , method_name ) ( source , field_name ) #NEWLINE# #UNINDENT# field = self . model . _meta . get_field ( field_name ) #NEWLINE# field_type_method_name = 'deserialize_type_{0}' . format ( field . __class__ . __name__ . lower ( ) ) #NEWLINE# if hasattr ( self , field_type_method_name ) : #NEWLINE# #INDENT# return getattr ( self , field_type_method_name ) ( source , field_name ) #NEWLINE# #UNINDENT# val = source . get ( field_name ) #NEWLINE# typ = field . get_internal_type ( ) #NEWLINE# if ( val and ( typ in ( 'DateField' , 'DateTimeField' ) ) ) : #NEWLINE# #INDENT# return datetime . datetime . strptime ( val , '%Y-%m-%dT%H:%M:%S.%f' ) #NEWLINE# #UNINDENT# if field . rel : #NEWLINE# #INDENT# if isinstance ( field , ManyToManyField ) : #NEWLINE# #INDENT# raise AttributeError #NEWLINE# #UNINDENT# return self . nested_deserialize ( field , source . get ( field_name ) ) #NEWLINE# #UNINDENT# return source . get ( field_name )