Lookup
Mixin for field lookups.
Usage
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
contains(value, properly=False, bb=False)Parameters
properly=False-
contains_properly bb=False-
bounding box,
bbcontains
overlaps()
Return whether field overlaps with geometry .
Usage
overlaps(geom, position="", bb=False)Parameters
position=""-
overlaps_{left, right, above, below} bb=False-
bounding box,
bboverlaps
range()
range
Usage
range(*values)relate()
relate
Usage
relate(*values)within()
Return whether field is within geometry.
Usage
within(geom, distance=None)Parameters
distance=None-
dwithin