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

Encode coalesced/list queries as DRF expects #149

Open
e3b0c442 opened this issue Feb 12, 2016 · 1 comment
Open

Encode coalesced/list queries as DRF expects #149

e3b0c442 opened this issue Feb 12, 2016 · 1 comment

Comments

@e3b0c442
Copy link

When using coalesce or querying multiple values for a key, EDA and its ancestors encode the query parameters as such (à la PHP/Rails):

?ids[]=1&ids[]=2&ids[]=3

Out of the box, DRF can handle this:

?id=1&id=2&id=3

Would need to change this for coalesced .find as well as .query (it looks like they live in two separate places in upstream code).

Could this be fixed on the server end? Yes, but it seems to me that if I'm going to modify Django's handling, I would use a JSON-API renderer/parser on the server side as well. If I'm using EDA, I'd like to be able to use DRF out of the box.

I'd be interested in tackling this, but before I dive in I want to make sure there's not a use case I'm missing.

@dustinfarris
Copy link
Owner

Great suggestion. I'd certainly be interested in a pull request from you. As you probably know, we currently suggest a server-side DRF filter to support this; but I see no reason or "use case" that warrants continued recommendation of this method. Out-of-the-box support would be much better.

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

No branches or pull requests

2 participants