# Filters

When you specify the fields attribute on a :class:~django_easyfilters.FilterSet subclass, various different Filter classes will be chosen depending on the type of field. They are listed below, with the keyword argument options that they take.

At the moment, all other methods of Filter and subclasses are considered private implementation details, until all the Filters are implemented and the API firms up.

This is the base class for all filters, and has provides some options:

• query_param:

The parameter in the query string that will be used for this field. This can be useful for shortening the query strings that are generated.

• order_by_count:

Default: False

If True, this will cause the choices to be sorted so that the choices with the largest 'count' appear first.

This is used for ForeignKey fields

This is used for ManyToMany fields

This is used for fields that have 'choices' defined. The choices presented will be in the order specified in 'choices'.

This is the most complex of the filters, as it allows drill-down from year to month to day. It takes the following options: