url_filter.backends.django module

class url_filter.backends.django.DjangoFilterBackend(queryset, context=None)[source]

Bases: url_filter.backends.base.BaseFilterBackend

Filter backend for filtering Django querysets.

Warning

The filter backend can ONLY filter Django’s QuerySet. Passing any other datatype for filtering will kill happy bunnies under rainbow.

empty()[source]

Get empty queryset

excludes

Property which gets list of negated filters

By combining all negated filters we can optimize filtering by calling QuerySet.exclude once rather then calling it for each filter specification.

filter_by_specs(queryset)[source]

Filter queryset by applying all filter specifications

The filtering is done by calling QuerySet.filter and QuerySet.exclude as appropriate.

get_model()[source]

Get the model from the given queryset

includes

Property which gets list of non-negated filters

By combining all non-negated filters we can optimize filtering by calling QuerySet.filter once rather then calling it for each filter specification.

name = u'django'
supported_lookups = set([u'gt', u'year', u'month', u'isnull', u'second', u'week_day', u'in', u'regex', u'gte', u'contains', u'lt', u'startswith', u'iendswith', u'icontains', u'iexact', u'exact', u'day', u'minute', u'hour', u'iregex', u'endswith', u'range', u'istartswith', u'lte'])