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

How can I make the filter work with jsonb in django? #296

Open
simkimsia opened this issue Dec 20, 2019 · 2 comments · May be fixed by #309
Open

How can I make the filter work with jsonb in django? #296

simkimsia opened this issue Dec 20, 2019 · 2 comments · May be fixed by #309

Comments

@simkimsia
Copy link
Contributor

Suppose I use a jsonb field how do I use it for filter?

example, under Person model, I have a JSONField called data that has the following default

{
  "email": "abc",
  "address": "abc"
}

And I want to use something like this:

/api/v1/people/?filter{data.email.icontains}=test5&per_page=20&page=1&sort[]=-modified

Is this something i can add as a pull request? I can help to write this

simkimsia added a commit to simkimsia/dynamic-rest that referenced this issue Sep 18, 2020
@simkimsia simkimsia linked a pull request Sep 18, 2020 that will close this issue
@simkimsia
Copy link
Contributor Author

Look at #250 as this PR appears to have solved this issue and includes sorting

simkimsia added a commit to simkimsia/dynamic-rest that referenced this issue Oct 8, 2020
simkimsia added a commit to simkimsia/dynamic-rest that referenced this issue Jan 6, 2021
simkimsia added a commit to simkimsia/dynamic-rest that referenced this issue Jan 13, 2022
@gorodovoy9000
Copy link

Hi guys!
Any news about the issue?
There is some new draft PR here
#342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants