Answer the question
In order to leave comments, you need to log in
Django filter Error?
Good afternoon
from django_filters import rest_framework as filters
from rest_framework import viewsets
from rest_framework.filters import SearchFilter, OrderingFilter
class ItemViewSet(viewsets.ModelViewSet):
__basic_fields = ('name', 'is_text')
queryset = Items.objects.all()
serializer_class = ItemsSerializer
filter_backends = (filters.DjangoFilterBackend, SearchFilter, OrderingFilter)
filter_fields = __basic_fields,
search_fields = __basic_fields
'tuple' object has no attribute 'split'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question