## Lookup


Mixin for field lookups.


Usage

``` python
Lookup()
```


> **Note: Note**
>
> Spatial lookups require `django.contrib.gis` to be enabled.


## Attributes

| Name | Description |
|----|----|
| [is_valid](#is_valid) | Whether field `isvalid`. |

------------------------------------------------------------------------


#### is_valid


Whether field `isvalid`.


`is_valid`


## Methods

| Name | Description |
|----|----|
| [contains()](#contains) | Return whether field [contains](Lookup.md#model_values.Lookup.contains) the value. Options apply only to geom fields. |
| [overlaps()](#overlaps) | Return whether field [overlaps](Lookup.md#model_values.Lookup.overlaps) with geometry . |
| [range()](#range) | range |
| [relate()](#relate) | relate |
| [within()](#within) | Return whether field is [within](Lookup.md#model_values.Lookup.within) geometry. |

------------------------------------------------------------------------


#### contains()


Return whether field [contains](Lookup.md#model_values.Lookup.contains) the value. Options apply only to geom fields.


Usage

``` python
contains(value, properly=False, bb=False)
```


##### Parameters


`properly=``False`  
`contains_properly`

`bb=``False`  
bounding box, `bbcontains`


------------------------------------------------------------------------


#### overlaps()


Return whether field [overlaps](Lookup.md#model_values.Lookup.overlaps) with geometry .


Usage

``` python
overlaps(geom, position="", bb=False)
```


##### Parameters


`position=``""`  
`overlaps_{left, right, above, below}`

`bb=``False`  
bounding box, `bboverlaps`


------------------------------------------------------------------------


#### range()


range


Usage

``` python
range(*values)
```


------------------------------------------------------------------------


#### relate()


relate


Usage

``` python
relate(*values)
```


------------------------------------------------------------------------


#### within()


Return whether field is [within](Lookup.md#model_values.Lookup.within) geometry.


Usage

``` python
within(geom, distance=None)
```


##### Parameters


`distance=None`  
`dwithin`
