carltongibson / django-filter

A generic system for filtering Django QuerySets based on user selections
https://django-filter.readthedocs.io/en/main/
Other
4.39k stars 760 forks source link

Allow passing a filterset class to `filterset_factory` #1631

Closed b1rger closed 4 months ago

b1rger commented 7 months ago

It would be nice if it was possible to override the filterset class that the filterset_factory is basing the returned filterset on. A similar thing is done in the table_factory in django-tables

carltongibson commented 7 months ago

Yes, maybe... 🤔

I had a similar need myself the other day. (I can't instantly remember what I did; I'll look when I'm back at it.)

One consideration is Meta inheritance...

carltongibson commented 6 months ago

Hi @b1rger. So, I ended up defining the filter set class inline in my case, but I still think this might be a useful addition.

Is it something you'd like to work on?

b1rger commented 6 months ago

Is it something you'd like to work on?

Sure!

carltongibson commented 4 months ago

Fixed in #1644