  
  
  # Regex for adding classes to html snippets
  class_re = re.compile(r'(?<=class=["\'])(.*)(?=["\'])')
  
  
 
</s> remove # These classes are used to test a misconfigured filter class.
class MisconfiguredFilter(django_filters.FilterSet):
    text = django_filters.CharFilter(lookup_type='icontains')
    class Meta:
        model = BasicModel
        fields = ['text']
 </s> add     # These classes are used to test a misconfigured filter class.
    class MisconfiguredFilter(django_filters.FilterSet):
        text = django_filters.CharFilter(lookup_type='icontains') </s> remove class FilterClassRootView(generics.ListCreateAPIView):
    model = FilterableItem
    filter_class = SeveralFieldsFilter
 </s> add         class Meta:
            model = FilterableItem
            fields = ['text', 'decimal', 'date'] </s> remove         expected_data = [ f for f in self.data if f['date'] == search_date ]
 </s> add         expected_data = [f for f in self.data if f['date'] == search_date] </s> remove import django_filters
 </s> add 
def replace_query_param(url, key, val):
    """
    Given a URL and a key/val pair, set or replace an item in the query
    parameters of the URL, and return the new URL.
    """
    (scheme, netloc, path, query, fragment) = urlsplit(url)
    query_dict = QueryDict(query).copy()
    query_dict[key] = val
    query = query_dict.urlencode()
    return urlunsplit((scheme, netloc, path, query, fragment))


  
  
def replace_query_param(url, key, val):
    """
    Given a URL and a key/val pair, set or replace an item in the query
    parameters of the URL, and return the new URL.
    """
    (scheme, netloc, path, query, fragment) = urlsplit(url)
    query_dict = QueryDict(query).copy()
    query_dict[key] = val
    query = query_dict.urlencode()
    return urlunsplit((scheme, netloc, path, query, fragment))


  # Regex for adding classes to html snippets
  class_re = re.compile(r'(?<=class=["\'])(.*)(?=["\'])')
  
  
keep add keep keep keep keep
 Make filtering optional, and pluggable. 
rest_framework/templatetags/rest_framework.py