django-filter chokes if model has a FileField or ImageField
petasis opened this issue · comments
Georgios Petasis commented
Hi all,
If a model has a file or an image, django-filter generates an exception.
Raises an exception:
AssertionError: AutoFilterSet resolved field 'document' with 'exact' lookup to an unrecognized field type FileField. Try adding an override to 'Meta.filter_overrides'. See: https://django-filter.readthedocs.io/en/main/ref/filterset.html#customise-filter-generation-with-filter-overrides
My first question is why the package does not exclude these fields by default?
And then, what to add to Meta.filter_overrides to exclude these fields?
Also, Meta.filter_overrides does not seem to work, I think it is empty, even if I have defined the property.
Carlton Gibson commented
See the discussion on #1478