Models¶
- class specimens.models.Person(*args, **kwargs)¶
A model that represents a Person object.
- first_name¶
The person’s first name.
- Type:
str
- middle_initial¶
The person’s middle initial.
- Type:
str
- last_name¶
The person’s last name.
- Type:
str
- suffix¶
The person’s suffix (if they have one).
- Type:
str
- date_created¶
The date when the object instance was created. Inherited from TimeStampMixin.
- Type:
datetime
- date_modified¶
The date when the object instance was last modified. Inherited from TimeStampMixin.
- Type:
datetime
- __str__()¶
Returns a string representation of a Person object instance.
- Returns:
A string that refers to a Person object instance.
- collector_name¶
A person’s name formatted for a specimen label.
The format is a person’s first initial, last name, and suffix (if they have one).
- full_name¶
A person’s full name.
The format is a person’s first name, middle initial (if one is provided), last name, and suffix (if they have one).
- class specimens.models.SpecimenRecord(*args, **kwargs)¶
A model for a SpecimenRecord object.
This model has a TON of fields on it, as it’s important to have detailed data for specimens in a collection. These details include the specimen’s taxonomy, its preparation, its locality, and the conditions under which it was captured.
- usi¶
The Unique Specimen Identifier (USI) number. I am setting it as my initials followed by a dash and a number (which I increment with each specimen added to the collection).
- Type:
str
- subspecies¶
The subspecies to which the specimen belongs, if the species has one.
- Type:
- determined_year¶
The year the determination was made.
- Type:
int
- sex¶
The sex of the specimen.
- Type:
str
- stage¶
The stage of the specimen.
- Type:
str
- preparation¶
The preparation type of the specimen.
- Type:
str
- preparation_date¶
The date the specimen was prepared.
- Type:
date
- labels_printed¶
Whether labels have been printed for the specimen.
- Type:
bool
- labeled¶
Whether the specimen has been labeled.
- Type:
bool
- photographed¶
Whether the specimen has been photographed.
- Type:
bool
- collecting_trip¶
The collecting trip on which the specimen was collected.
- Type:
- day¶
The day on which the specimen was collected.
- Type:
int
- month¶
The month in which the specimen was collected.
- Type:
str
- year¶
The year in which the specimen was collected.
- Type:
int
- method¶
The method used to collect the specimen.
- Type:
str
- weather¶
A brief description of the weather conditions during the specimen’s capture.
- Type:
str
- temperature¶
The outdoor temperature during the specimen’s capture. It is a string rather than a float so that I have control on whether or not a decimal point on the field is serialized.
- Type:
str
- time_of_day¶
The time of day (or night) the specimen was captured.
- Type:
str
- habitat¶
The habitat details of where the specimen was captured.
- Type:
str
- notes¶
Any additional notes about the specimen.
- Type:
str
- date_created¶
The date when the object instance was created. Inherited from TimeStampMixin.
- Type:
datetime
- date_modified¶
The date when the object instance was last modified. Inherited from TimeStampMixin.
- Type:
datetime
- __str__()¶
Returns a string representation of a SpecimenRecord object instance.
- Returns:
A string that refers to a SpecimenRecord object instance.
- identified¶
A boolean representing whether or not a specimen is identified to species.
- collected_date¶
The collected date used for specimen labels.
Because the day, month, and year fields are optional, these fields must be checked. Fields with non-null values are used to construct the final formatted date.
Examples of possible dates include “1-Jan-2000”, “Jan 2000”, and “2000”.
- full_date¶
The full date on which a specimen was collected.
Because the day, month, and year fields are optional, these fields must be checked. Fields with non-null values are used to construct the final formatted date.
Examples of possible dates include “1 January 2000”, “January 2000”, and “2000”.
- num_date¶
The date on which a specimen was collected, formatted as YYYY-MM-DD.
Because the day, month, and year fields are optional, these fields must be checked. Fields with non-null values are used to construct the final numerical date.
- collectors¶
All collector names for a given specimen joined into a string.
- temp_F¶
Temperature with “F” (Fahrenheit) appended to the end.
- temp_C¶
Temperature with “C” (Celsius) appended to the end.