Query

Base class: Part

Declare a query language. Example:

class AlbumQuery(Query):
    year = Filter.integer()
    name = Filter()

query_set = Album.objects.filter(
    AlbumQuery().bind(request=request).get_q()
)

Refinable members

advanced

Type: Namespace

Cookbook:

How do I customize the advanced query language area?

after     (evaluated)

Type: int | str

See after

assets

Type: Namespace

See assets

attrs     (evaluated)

Type: Attrs

Cookbook:

How do I control what Q is produced?

auto

Type: QueryAutoConfig

See auto

endpoints

Type: Namespace

extra

Type: dict[str, Any]

See extra

extra_evaluated

Type: dict[str, Any]

See extra

extra_params

filter

Cookbook:

How does a query filter the rows, and how do I post-process them?

filters

Type: Namespace

Cookbook:

How does a query filter the rows, and how do I post-process them?

form

Type: Namespace

Cookbook:

How do I set an initial filter to a table?

form_class

Type: type[Form]

Cookbook:

How do I use a custom class for the columns/fields/filters of a component?

form_container     (evaluated)

Type: Fragment

Cookbook:

How do I control what Q is produced?

include     (evaluated)

Type: bool

See include

iommi_style

Type: str | Style | None

member_class

Type: type[Filter]

Cookbook:

How do I use a custom class for the columns/fields/filters of a component?

model     (evaluated)

Type: type[Model] | None

Cookbook:

How does a query filter the rows, and how do I post-process them?

postprocess

Cookbook:

How does a query filter the rows, and how do I post-process them?

rows

Cookbook:

How does a query filter the rows, and how do I post-process them?

tag     (evaluated)

Type: str

Default: div

See tag

Cookbook:

How do I control what Q is produced?

template     (evaluated)

Type: str | Template

Methods

get_advanced_query_param

get_q

Create a query set based on the data in the request.

get_query_string

Based on the data in the request, return the equivalent query string that you can use with parse_query_string() to create a query set.

on_bind

on_refine_done

own_evaluate_parameters

parse_query_string

Class methods

filters_from_model