Lookup

Mixin for field lookups.

Usage

Source

Lookup()
Note

Spatial lookups require django.contrib.gis to be enabled.

Attributes

Name Description
is_valid Whether field isvalid.

is_valid

Whether field isvalid.

is_valid

Methods

Name Description
contains() Return whether field contains the value. Options apply only to geom fields.
overlaps() Return whether field overlaps with geometry .
range() range
relate() relate
within() Return whether field is within geometry.

contains()

Return whether field contains the value. Options apply only to geom fields.

Usage

Source

contains(value, properly=False, bb=False)
Parameters
properly=False

contains_properly

bb=False
bounding box, bbcontains

overlaps()

Return whether field overlaps with geometry .

Usage

Source

overlaps(geom, position="", bb=False)
Parameters
position=""

overlaps_{left, right, above, below}

bb=False
bounding box, bboverlaps

range()

range

Usage

Source

range(*values)

relate()

relate

Usage

Source

relate(*values)

within()

Return whether field is within geometry.

Usage

Source

within(geom, distance=None)
Parameters
distance=None
dwithin