Models

class images.models.CustomImage(*args, **kwargs)

A model that represents a custom image object.

Because this model inherits from Wagtail’s AbstractImage, it has additional fields (like title and description). For the purposes of this project, the title will be used as the image’s name, and the description will be used like a caption field.

alt_text

The alternative text of the image.

Type:

str

date

The date the image was taken.

Type:

date

notes

Any additional notes that may be included with the image.

Type:

str

x_large

The largest version of an image (either a max of 2000px wide or 2000px tall).

large

A large version of an image (either a max of 1500px wide or 1500px tall).

medium

A medium version of an image (either a max of 1200px wide or 1200px tall).

small

A small version of an image (either a max of 900px wide or 900px tall).

x_small

An extra small version of an image (either a max of 600px wide or 600px tall).

thumbnail

A thumbnail version of an image (either a max of 300px wide or 300px tall).

class images.models.CustomRendition(*args, **kwargs)

A model that represents a custom rendition object.

image

The image to which this rendition belongs.

Type:

CustomImage

class images.models.BaseLiveImage(*args, **kwargs)

A model that represents a live subject (insect, plant, or habitat).

It inherits from CustomImage, so it has all of the same attributes as that model (and more below).

country

The country in which the image was taken.

Type:

Country

state

The state (or province) in which the image was taken.

Type:

State

county

The county (or parish or census area) in which the image was taken.

Type:

County

locality

The locality at which the image was taken.

Type:

Locality

gps

The GPS coordinates at which the image was taken.

Type:

GPS

collecting_trip

The collecting trip during which the image was taken.

Type:

CollectingTrip

class images.models.SpecimenRecordImage(*args, **kwargs)

A model that represents a specimen record image object.

This image model is only for photographs of specimens in the collection, and not live insects.

usi

The specimen record to which this image belongs.

Type:

SpecimenRecord

position

The position of the specimen in the image (dorsal, ventral, or lateral).

Type:

str

class images.models.InsectImage(*args, **kwargs)

A model that represents an insect image object.

This image model is only for photographs of live insects (either in the wild or captivity) and not for specimens in the collection.

species

The species of insect in the image (if known).

Type:

Species

species_page

The species page to which this image should be attached (if the insect in the photo is identified).

Type:

SpeciesPage

featured_family

Indicates whether the image should be the one featured for the insect’s family (if the insect is identified).

Type:

bool

featured_species

Indicates whether the image should be the one featured for the insect’s species (if the insect is identified).

Type:

bool

sex

The sex of the insect in the image, if known.

Type:

str

stage

The stage of the insect in the image.

Type:

str

status

The status of the insect in the image (wild, reared, or bred).

Type:

str

identified

A boolean representing whether the insect in the image is identified to species.

family

The name of the family to which the insect in the image belongs.

species_binomial

The binomial of the species to which the insect in the image belongs.

class images.models.PlantImage(*args, **kwargs)

A model that represents a plant image object.

species_page

The species page(s) to which this image should be attached.

Type:

SpeciesPage

scientific_name

The scientific name of the plant in the image, if known.

Type:

str

common_name

The common name of the plant in the image, if known or if it has one.

Type:

str

class images.models.HabitatImage(*args, **kwargs)

A model that represents a habitat image object.

species_page

The species page(s) to which this image should be attached.

Type:

SpeciesPage