def source_desti_field_chk(base_field, base_field_type, field_name):
    """Prepare filters (kwargs{}) for django queryset
       where fields contain string are checked like
       exact | startswith | contains | endswith

    >>> source_desti_field_chk(21, '1', 'contact')
    {'contact__exact': 21}

    >>> source_desti_field_chk(21, '2', 'contact')
    {'contact__startswith': 21}

    >>> source_desti_field_chk(21, '3', 'contact')
    {'contact__contains': 21}

    >>> source_desti_field_chk(21, '4', 'contact')
    {'contact__endswith': 21}
    """
    kwargs = {}
    if base_field != '':
        if base_field_type == '1':
            kwargs[field_name + '__exact'] = base_field
        if base_field_type == '2':
            kwargs[field_name + '__startswith'] = base_field
        if base_field_type == '3':
            kwargs[field_name + '__contains'] = base_field
        if base_field_type == '4':
            kwargs[field_name + '__endswith'] = base_field
    return kwargs