AltSchool / dynamic-rest

Dynamic extensions for Django REST Framework
MIT License
831 stars 109 forks source link

AND filtering on same field #352

Open giohappy opened 1 year ago

giohappy commented 1 year ago

Are AND filters on the same field supported? I went through the code but apparently, we don't have the option to use eq multiple times (it takes only the first one).

How do you create a query like Q(keywords__pk=1) & Q(keywords__pk=2)?

I've seen from code inside tests that in recent versions of dynamic-rest "complex" filtering has been introduced, to support mixes of and/or filters, but we cannot upgrade at the moment.