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

Hardcoded filter in multi-value dependend fields #80

Open
tyctor opened this issue Sep 3, 2021 · 1 comment
Open

Hardcoded filter in multi-value dependend fields #80

tyctor opened this issue Sep 3, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@tyctor
Copy link

tyctor commented Sep 3, 2021

I think, that is not good idea to hardcode filter used in dependent field to filter queryset

this line:

f"{model_field_name}__in": self.request.GET.getlist(

is adding this hardcoded filter __in

but in my use case i need another filter to be used - __has_any_keys to query postgress JSONField
so better will be to let user to choose kind of filter in widget initialization, instead of hardcode __in

@tyctor tyctor added the bug Something isn't working label Sep 3, 2021
@codingjoe
Copy link
Owner

Hi @tyctor,

You have a point. However, this package is supposed to work in most, but not all cases out of the box. If you have a good solution, please share. If not, we maybe just need to improve the documentation, to help people override the function.

Best
Joe

@codingjoe codingjoe assigned tyctor and unassigned codingjoe Sep 16, 2021
@codingjoe codingjoe added enhancement New feature or request and removed bug Something isn't working labels Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants