Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a Django-filters widget or class override to allow passing a list instead of a csv formated string for fitlers #267

Open
AMontagu opened this issue Feb 15, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@AMontagu
Copy link
Collaborator

As Django filters is based on query params it only support string format and then convert it.
As DSG use gRPC we can pass more complex type.
It could be a good idea to let user passing a list directly without having it to convert in CSV format.

As is it not prioritary it will not be set for the 1.0.0 and mostly will be an how-to in the doc or an external package. As so we are looking for contributors to help us with that.

@AMontagu AMontagu added the help wanted Extra attention is needed label Feb 15, 2024
@legau
Copy link
Contributor

legau commented Feb 15, 2024

There is already QueryArrayWidget working with arrays

@AMontagu
Copy link
Collaborator Author

Not exactly

If you look at the comment under the QueryArrayWidget: https://github.com/carltongibson/django-filter/blob/a2f7aba4e9aca9d6e9fc1f2ddc554daf87e8457e/django_filters/widgets.py#L240

It allow to transform string to array. What we want here is to directly deal with array. It may work if we pass directly MultiValueDict to the widget but we want to pass array to it.

@AMontagu AMontagu changed the title Adding a Djanog-filters widget or class override to allow passing a list instead of a csv formated string for fitlers Adding a Django-filters widget or class override to allow passing a list instead of a csv formated string for fitlers Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants