[Answered ]-Swagger boolean parameter value True/False instead of true/false and django_filters

2👍

solution:

The base django_filters.FilterSet is intended to be used with vanilla Django views. If you’re creating an API with DRF, you should use django_filters.rest_framework.FilterSet as it uses a slightly different set of filters that is more suitable for use in an API. In this case, the BooleanFilter accepts lowercase true/false values.

After adjusted import:

from django_filters import ModelMultipleChoiceFilter
from django_filters.rest_framework import BooleanFilter, FilterSet

Leave a comment