1from django_filters import rest_framework as filters
2
3class ProductFilter(filters.FilterSet):
4 class Meta:
5 model = Product
6 fields = ('field')
1def product_list(request):
2 filter = ProductFilter(request.GET, queryset=Product.objects.all())
3 return render(request, 'my_app/template.html', {'filter': filter})