if value is an instance of datetime and settings.USE_TZ if use_tz is None else use_tz and call to the function is_naive,
should_convert = ( isinstance ( value , datetime ) and ( settings . USE_TZ if use_tz is None else use_tz ) and not is_naive ( value ) and getattr ( value , 'convert_to_local_time' , True ) )