'SQLite returns floats when it should be returning decimals,
and gets dates and datetimes wrong.
For consistency with other backends, coerce when required.'

def convert_values(self, value, field):

    if (value is None):
        return None
    internal_type = field.get_internal_type()
    if (internal_type == u'DecimalField'):
        return util.typecast_decimal(field.format_number(value))
    elif ((internal_type and internal_type.endswith(u'IntegerField')) or (internal_type == u'AutoField')):
        return int(value)
    elif (internal_type == u'DateField'):
        return parse_date(value)
    elif (internal_type == u'DateTimeField'):
        return parse_datetime_with_timezone_support(value)
    elif (internal_type == u'TimeField'):
        return parse_time(value)
    return value
