django filter

Solutions on MaxInterview for django filter by the best coders in the world

showing results for - "django filter"
Benjamín
17 Oct 2017
1from django_filters import rest_framework as filters
2
3class ProductFilter(filters.FilterSet):
4    class Meta:
5        model = Product
6        fields = ('field')
Marley
19 Aug 2019
1def product_list(request):
2    filter = ProductFilter(request.GET, queryset=Product.objects.all())
3    return render(request, 'my_app/template.html', {'filter': filter})
queries leading to this page
django filtersdjango filter