You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 18, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 18, 2019. It is now read-only.
In Django you can use request.query_params.getlist('filter') to return a list of [1,2,3]
However I'm not sure this is supported with the core api clients.
Seems to be because you can only have one filter property in the list of params:
Rather than having multiple fields in this case, we want to have a single field, but allow the value of the parameter to be an array, and to handle the array case in the way you describe.
That's something that'll end up on my todo at some point, tho you're very welcome to take a crack at it first if you fancy.
That makes sense thanks @tomchristie. Will take a look if I can - but got a workaround for now. 😄
Which involves splitting the comma delimited string.
But yes, would be nice to figure out where the translation from array to query string param happens and if that's in coreapi or one of the URL helper libs.
Activity
lovelydinosaur commentedon May 9, 2017
Howdy @jdelight! 😄
Rather than having multiple fields in this case, we want to have a single field, but allow the value of the parameter to be an array, and to handle the array case in the way you describe.
That's something that'll end up on my todo at some point, tho you're very welcome to take a crack at it first if you fancy.
jdelight commentedon May 9, 2017
That makes sense thanks @tomchristie. Will take a look if I can - but got a workaround for now. 😄
Which involves splitting the comma delimited string.
But yes, would be nice to figure out where the translation from array to query string param happens and if that's in coreapi or one of the URL helper libs.
ryanolf commentedon May 1, 2018
@tomchristie @jdelight I ran into the same issue of needing repeating parameters and have added this feature to my branch. See pull request.