from . import forms
import django_filters as filters


class Group(filters.FilterSet):
    name = filters.CharFilter(lookup_expr='icontains')

    class Meta:
        form = forms.GroupFilter

from . import forms
import django_filters as filters
from features.groups import models


class Group(filters.FilterSet):
    name = filters.CharFilter(label='Name', lookup_expr='icontains')

    class Meta:
        model = models.Group
        fields = ['name']
        form = forms.GroupFilter

Fix filter for django-filter 1.0
Fix filter for django-filter 1.0

  from . import forms
  import django_filters as filters
+ from features.groups import models
  
  
  class Group(filters.FilterSet):
-     name = filters.CharFilter(lookup_expr='icontains')
+     name = filters.CharFilter(label='Name', lookup_expr='icontains')
  
      class Meta:
+         model = models.Group
+         fields = ['name']
          form = forms.GroupFilter
  
Fix filter for django-filter 1.0
## Code Before:
from . import forms
import django_filters as filters


class Group(filters.FilterSet):
    name = filters.CharFilter(lookup_expr='icontains')

    class Meta:
        form = forms.GroupFilter

## Instruction:
Fix filter for django-filter 1.0
## Code After:
from . import forms
import django_filters as filters
from features.groups import models


class Group(filters.FilterSet):
    name = filters.CharFilter(label='Name', lookup_expr='icontains')

    class Meta:
        model = models.Group
        fields = ['name']
        form = forms.GroupFilter
