django-url-filter icon indicating copy to clipboard operation
django-url-filter copied to clipboard

Support for has_any_keys ?

Open selimt opened this issue 8 years ago • 1 comments

Hi, I have a model with a JSONField which contains an array of strings:

class TransferSession(models.Model):
...
status = JSONField(default=[], validators=[validate_session_status])

I can use filters like this in the URL which works fine:

/api/sessions/?status__contains="running"

Now I'd like to use the "has_any_keys" filter to match any of the given values:

/api/sessions/?status__has_any_keys=["running","stopped"]

but it doesn't seem to work. Is it not currently supported?

Thanks -Selim

selimt avatar Jun 05 '17 23:06 selimt

yes thats not currently supported. contributions are welcome though 😄

miki725 avatar Jun 15 '17 14:06 miki725