modlinltd / django-advanced-filters

Add advanced filtering abilities to Django admin
https://pypi.org/project/django-advanced-filters/
MIT License
771 stars 173 forks source link

Restrict Valid Operators Based on Field Type #75

Closed mrname closed 6 years ago

mrname commented 6 years ago

As of right now, all operators are available regardless of the field type. For instance, the admin section would allow you to choose the "Equals" or "Greater Than" operators for a boolean field. It would be great if the UI would only present appropriate operators based on the field type. I am not certain as to whether this is something I could already implement in my admin class, or if this should be a feature request, in which case I am happy to look into whipping up a PR. Thanks!

asfaltboy commented 6 years ago

Thanks for the contribution @mrname ! This seems like this feature request is a dupe of #23, which also has some inspiration sources. Please have a look and let reopen this ticket if differs. And yes, we really ❤️PRs!