django-url-filter
django-url-filter copied to clipboard
Django URL Filter provides a safe way to filter data via human-friendly URLs.
Hello django-url-filter team. My project has a rather confusing data structure and the requests are very long. Example. I have posters and campaign models. If I want filter posters by...
Hi I have a callable filter that handles a custom lookup that I implemented: ``` class StatusFilter(CallableFilter): @form_field_for_filter(forms.CharField()) def filter_has_any_keys_for_django(self, queryset, spec): value = spec.value.split(',') if spec.is_negated: return queryset.exclude(status__has_any_keys=value) else:...
Given a contrived model: ``` class A(models.Model): data = JSONField() a = A(data={"name": "James"}) a.save() ``` This allows queries such as: ``` ?data__name__icontains=James ?data__icontains=James ```
Having form validate all of the query data, might as well add ordering support.
I am trying to query datetime, but have not been able to get it to work using iso datetime format: api/meas/?timestamp__lte=2019-06-20T15:20:30×tamp__gte=2019-05-12T15:20:30 Will return no data. However, it will work if...
For url parameters passing an array, such as "x__in=[1,2,3]", these are generally encoded as "x__in=1&x__in=2&x__in=3", but can also be passed as "x__in[]=1&x__in[]=2&x__in[]=3" (for example, this is default behavior in the...
If [`TIME_ZONE`](https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-TIME_ZONE) is set to `America/New_York`, [`USE_TZ`](https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-USE_TZ) is set to `True`, and this field is in the database: ```JSON { "id": 1, "time": "2019-08-31T20:28:42-04:00" } ``` `?time__hour=16` will return the...
I'm trying to filter on a jsonfield in django named `data_filters`. However it seems like this is not working when I'm not specifying any filters. And when i try to...
I have a case where I have a list of dictionaries containing my data and I want to be able to filter this via a URL query. There are no...