[Answer]-Filtering by foreign key in dropdown

1👍

Just don’t define the manufacturer filter field at all and django-filter will use the default filter for this field (which is a drop down). So something like this should be working:

class CarFilter(django_filters.FilterSet):
    class Meta:
        model = Car
        fields = ['name', 'manufacturer']

Leave a comment