seshat.apps.crisisdb.models

Attributes

ATTENTION_TAGS_CHOICES

CRISIS_CONSEQUENCE_CHOICES

DURATION_DISEASE_OUTBREAK_CHOICES

HUMAN_SACRIFICE_HUMAN_SACRIFICE_CHOICES

MAGNITUDE_DISEASE_OUTBREAK_CHOICES

SUB_CATEGORY_DISEASE_OUTBREAK_CHOICES

US_STATE_CHOICES

VIOLENCE_TYPE_CHOICES

Classes

Agricultural_population

Model representing an agricultural population.

Arable_land

Model representing an arable land.

Arable_land_per_farmer

Model representing an arable land per farmer.

Crisis_consequence

Model representing a crisis consequence.

Crop_failure_event

Model representing a crop failure event.

Disease_outbreak

Model representing a disease outbreak.

Drought_event

Model representing a drought event.

External_conflict

Model representing an external conflict.

External_conflict_side

Model representing an external conflict side.

Famine_event

Model representing a famine event.

Gdp_per_capita

Model representing a GDP value per capita.

Gross_grain_shared_per_agricultural_population

Model representing a gross grain shared per agricultural population.

Human_sacrifice

Model representing a human sacrifice.

Internal_conflict

Model representing an internal conflict.

Locust_event

Model representing a locust event.

Military_expense

Model representing a military expense.

Net_grain_shared_per_agricultural_population

Model representing a net grain shared per agricultural population.

Power_transition

Model representing a power transition.

Silver_inflow

Model representing a silver inflow.

Silver_stock

Model representing a silver stock.

Socioeconomic_turmoil_event

Model representing a socioeconomic turmoil event.

Surplus

Model representing a surplus.

Total_population

Model representing a total population.

Us_location

Model representing a location in the US.

Us_violence

Model representing a violence event in the US.

Us_violence_data_source

Model representing a data source for violence in the US.

Us_violence_subtype

Model representing a subtype of violence in the US.

Functions

call_my_name(self)

This function is used to return the name of the model instance (in lieu of

clean_times(self)

This function is used to validate the year_from and year_to fields of the

clean_times_light(self)

has_a_polity(self)

return_beautiful_abs_pres(item)

return_citations(self)

This function is used to return the citations of the model instance

Module Contents

class seshat.apps.crisisdb.models.Agricultural_population

Bases: seshat.apps.core.models.SeshatCommon

Model representing an agricultural population.

class Meta
Noindex:

verbose_name = 'Agricultural_population'
verbose_name_plural = 'Agricultural_populations'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

agricultural_population
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
class seshat.apps.crisisdb.models.Arable_land

Bases: seshat.apps.core.models.SeshatCommon

Model representing an arable land.

class Meta
Noindex:

verbose_name = 'Arable_land'
verbose_name_plural = 'Arable_lands'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

arable_land
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
class seshat.apps.crisisdb.models.Arable_land_per_farmer

Bases: seshat.apps.core.models.SeshatCommon

Model representing an arable land per farmer.

class Meta
Noindex:

verbose_name = 'Arable_land_per_farmer'
verbose_name_plural = 'Arable_land_per_farmers'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

arable_land_per_farmer
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
class seshat.apps.crisisdb.models.Crisis_consequence

Bases: seshat.apps.core.models.SeshatCommon

Model representing a crisis consequence.

class Meta
Noindex:

ordering = ['year_from', 'year_to']
verbose_name = 'Crisis consequence'
verbose_name_plural = 'Crisis consequences'
clean()
clean_collapse()
clean_decline()
clean_name()

Return the name of the model instance.

Noindex:

Note

TODO This method should probably just be an attribute set on the model instead.

Returns:

The name of the model instance.

Return type:

str

clean_name_spaced()
get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

get_columns_with_value(value)

Return the columns with a given value.

Noindex:

Parameters:

value (str) – The value to search for.

Returns:

A list of columns with the given value. If no columns have

the given value, the method returns None.

Return type:

list

get_columns_with_value_dic(value)
show_nga()
show_value()
assassination
capital
century_plus
civil_war
collapse
conquest
constitution
crisis_case_id
decline
depose
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

downward_mobility
epidemic
extermination
fragmentation
is_first_100
labor
name
other_polity
public_goods
religion
revolution
successful_revolution
suffrage
unfree_labor
uprising
class seshat.apps.crisisdb.models.Crop_failure_event

Bases: seshat.apps.core.models.SeshatCommon

Model representing a crop failure event.

class Meta
Noindex:

verbose_name = 'Crop_failure_event'
verbose_name_plural = 'Crop_failure_events'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

crop_failure_event
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
class seshat.apps.crisisdb.models.Disease_outbreak

Bases: seshat.apps.core.models.SeshatCommon

Model representing a disease outbreak.

class Meta
Noindex:

verbose_name = 'Disease_outbreak'
verbose_name_plural = 'Disease_outbreaks'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

duration
elevation
latitude
longitude
magnitude
name
sub_category
class seshat.apps.crisisdb.models.Drought_event

Bases: seshat.apps.core.models.SeshatCommon

Model representing a drought event.

class Meta
Noindex:

verbose_name = 'Drought_event'
verbose_name_plural = 'Drought_events'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

drought_event
name
class seshat.apps.crisisdb.models.External_conflict

Bases: seshat.apps.core.models.SeshatCommon

Model representing an external conflict.

class Meta
Noindex:

verbose_name = 'External_conflict'
verbose_name_plural = 'External_conflicts'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

conflict_name
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
class seshat.apps.crisisdb.models.External_conflict_side

Bases: seshat.apps.core.models.SeshatCommon

Model representing an external conflict side.

class Meta
Noindex:

verbose_name = 'External_conflict_side'
verbose_name_plural = 'External_conflict_sides'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

casualty
conflict_id
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

expenditure
leader
name
class seshat.apps.crisisdb.models.Famine_event

Bases: seshat.apps.core.models.SeshatCommon

Model representing a famine event.

class Meta
Noindex:

verbose_name = 'Famine_event'
verbose_name_plural = 'Famine_events'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

famine_event
name
class seshat.apps.crisisdb.models.Gdp_per_capita

Bases: seshat.apps.core.models.SeshatCommon

Model representing a GDP value per capita.

class Meta
Noindex:

verbose_name = 'Gdp_per_capita'
verbose_name_plural = 'Gdp_per_capitas'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

gdp_per_capita
name
class seshat.apps.crisisdb.models.Gross_grain_shared_per_agricultural_population

Bases: seshat.apps.core.models.SeshatCommon

Model representing a gross grain shared per agricultural population.

class Meta
Noindex:

verbose_name = 'Gross_grain_shared_per_agricultural_population'
verbose_name_plural = 'Gross_grain_shared_per_agricultural_populations'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

gross_grain_shared_per_agricultural_population
name
class seshat.apps.crisisdb.models.Human_sacrifice

Bases: seshat.apps.core.models.SeshatCommon

Model representing a human sacrifice.

class Meta
Noindex:

ordering = ['year_from', 'year_to']
verbose_name = 'Human_sacrifice'
verbose_name_plural = 'Human_sacrifices'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

clean_name()

Return the name of the model instance.

Noindex:

Note

TODO This method should probably just be an attribute set on the model instead.

Returns:

The name of the model instance.

Return type:

str

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

show_nga()
show_value()
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

human_sacrifice
name
class seshat.apps.crisisdb.models.Internal_conflict

Bases: seshat.apps.core.models.SeshatCommon

Model representing an internal conflict.

class Meta
Noindex:

verbose_name = 'Internal_conflict'
verbose_name_plural = 'Internal_conflicts'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

casualty
conflict
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

expenditure
leader
name
class seshat.apps.crisisdb.models.Locust_event

Bases: seshat.apps.core.models.SeshatCommon

Model representing a locust event.

class Meta
Noindex:

verbose_name = 'Locust_event'
verbose_name_plural = 'Locust_events'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

locust_event
name
class seshat.apps.crisisdb.models.Military_expense

Bases: seshat.apps.core.models.SeshatCommon

Model representing a military expense.

class Meta
Noindex:

verbose_name = 'Military_expense'
verbose_name_plural = 'Military_expenses'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

conflict
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

expenditure
name
class seshat.apps.crisisdb.models.Net_grain_shared_per_agricultural_population

Bases: seshat.apps.core.models.SeshatCommon

Model representing a net grain shared per agricultural population.

class Meta
Noindex:

verbose_name = 'Net_grain_shared_per_agricultural_population'
verbose_name_plural = 'Net_grain_shared_per_agricultural_populations'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
net_grain_shared_per_agricultural_population
class seshat.apps.crisisdb.models.Power_transition

Bases: seshat.apps.core.models.SeshatCommon

Model representing a power transition.

class Meta
Noindex:

ordering = ['year_from', 'year_to']
verbose_name = 'Power Transition'
verbose_name_plural = 'Power Transitions'
clean()
clean_name()

Return the name of the model instance.

Noindex:

Note

TODO This method should probably just be an attribute set on the model instead.

Returns:

The name of the model instance.

Return type:

str

clean_name_spaced()
get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

get_columns_with_value(value)

Return the columns with a given value.

Noindex:

Parameters:

value (str) – The value to search for.

Returns:

A list of columns with the given value. If no columns have

the given value, the method returns None.

Return type:

list

get_columns_with_value_dic(value)
show_nga()
show_value()
contested
culture_group
property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

external_interference
external_invasion
intra_elite
military_revolt
name
overturn
popular_uprising
predecessor
predecessor_assassination
reign_number_predecessor
separatist_rebellion
successor
class seshat.apps.crisisdb.models.Silver_inflow

Bases: seshat.apps.core.models.SeshatCommon

Model representing a silver inflow.

class Meta
Noindex:

verbose_name = 'Silver_inflow'
verbose_name_plural = 'Silver_inflows'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
silver_inflow
class seshat.apps.crisisdb.models.Silver_stock

Bases: seshat.apps.core.models.SeshatCommon

Model representing a silver stock.

class Meta
Noindex:

verbose_name = 'Silver_stock'
verbose_name_plural = 'Silver_stocks'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
silver_stock
class seshat.apps.crisisdb.models.Socioeconomic_turmoil_event

Bases: seshat.apps.core.models.SeshatCommon

Model representing a socioeconomic turmoil event.

class Meta
Noindex:

verbose_name = 'Socioeconomic_turmoil_event'
verbose_name_plural = 'Socioeconomic_turmoil_events'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
socioeconomic_turmoil_event
class seshat.apps.crisisdb.models.Surplus

Bases: seshat.apps.core.models.SeshatCommon

Model representing a surplus.

class Meta
Noindex:

verbose_name = 'Surplus'
verbose_name_plural = 'Surplus'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
surplus
class seshat.apps.crisisdb.models.Total_population

Bases: seshat.apps.core.models.SeshatCommon

Model representing a total population.

class Meta
Noindex:

verbose_name = 'Total_population'
verbose_name_plural = 'Total_populations'
clean()

Validate the year_from and year_to fields of the model instance.

Noindex:

Note

The method an alias for the clean_times function.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

get_absolute_url()

Returns the url to access a particular instance of the model.

Noindex:

Returns:

A string of the url to access a particular instance of the model.

Return type:

str

property display_citations

Display the citations of the model instance.

Noindex:

Note

The method is a property, and an alias for the return_citations function.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

name
total_population
class seshat.apps.crisisdb.models.Us_location

Bases: django.db.models.Model

Model representing a location in the US.

class Meta
Noindex:

ordering = ['us_state', '-city', '-county', '-special_place']
attention_tag
city
county
special_place
us_state
class seshat.apps.crisisdb.models.Us_violence

Bases: django.db.models.Model

Model representing a violence event in the US.

class Meta
Noindex:

ordering = ['-violence_date', '-fatalities']
show_locations()
show_narrative_without_quotes()
show_short_data_sources()
show_source_details_without_quotes()
show_violence_subtypes()
fatalities
location
narrative
short_data_source
source_details
url_address
violence_date
violence_subtype
violence_type
class seshat.apps.crisisdb.models.Us_violence_data_source

Bases: django.db.models.Model

Model representing a data source for violence in the US.

class Meta
Noindex:

ordering = ['name']
abbreviation
attention_tag
is_uncertain
name
url_address
class seshat.apps.crisisdb.models.Us_violence_subtype

Bases: django.db.models.Model

Model representing a subtype of violence in the US.

class Meta
Noindex:

ordering = ['name']
is_uncertain
name
seshat.apps.crisisdb.models.call_my_name(self)

This function is used to return the name of the model instance (in lieu of the __str__ representation of the model instance).

Note

The model instance must have the following attributes: - name - polity (and polity.name) - year_from - year_to

Parameters:

self (model instance) – The model instance.

Returns:

The name of the model instance.

Return type:

str

seshat.apps.crisisdb.models.clean_times(self)

This function is used to validate the year_from and year_to fields of the model instance (called from each model’s clean method).

Note

The model instance must have the following attributes: - year_from - year_to - polity (and polity.start_year and polity.end_year)

Parameters:

self (model instance) – The model instance.

Returns:

None

Raises:
  • ValidationError – If the year_from is greater than the year_to.

  • ValidationError – If the year_from is out of range.

  • ValidationError – If the year_from is earlier than the start year of the corresponding polity.

  • ValidationError – If the year_to is later than the end year of the corresponding polity.

  • ValidationError – If the year_to is out of range.

seshat.apps.crisisdb.models.clean_times_light(self)
seshat.apps.crisisdb.models.has_a_polity(self)
seshat.apps.crisisdb.models.return_beautiful_abs_pres(item)
seshat.apps.crisisdb.models.return_citations(self)

This function is used to return the citations of the model instance (returning the value used in the display_citations method of the model instance).

Note

The model instance must have the following attribute: - citations

The model instance must have the following methods: - zoteroer

Parameters:

self (model instance) – The model instance.

Returns:

The citations of the model instance, separated by comma.

Return type:

str

seshat.apps.crisisdb.models.ATTENTION_TAGS_CHOICES = (('NeedsExpertInput', 'Needs Expert Input'), ('IsInconsistent', 'Is Inconsistent'), ('IsWrong',...
seshat.apps.crisisdb.models.CRISIS_CONSEQUENCE_CHOICES = (('U', 'Unknown'), ('SU', 'Suspected Unknown'), ('P', 'Present'), ('A', 'Absent'), ('IP',...
seshat.apps.crisisdb.models.DURATION_DISEASE_OUTBREAK_CHOICES = (('No description', 'No description'), ('Over 90 Days', 'Over 90 Days'), ('Uncertain',...
seshat.apps.crisisdb.models.HUMAN_SACRIFICE_HUMAN_SACRIFICE_CHOICES = (('U', 'Unknown'), ('P', 'Present'), ('A~P', 'Transitional (Absent -> Present)'), ('A',...
seshat.apps.crisisdb.models.MAGNITUDE_DISEASE_OUTBREAK_CHOICES = (('Uncertain', 'Uncertain'), ('Light', 'Light'), ('Heavy', 'Heavy'), ('No description', 'No...
seshat.apps.crisisdb.models.SUB_CATEGORY_DISEASE_OUTBREAK_CHOICES = (('Peculiar Epidemics', 'Peculiar Epidemics'), ('Pestilence', 'Pestilence'), ('Miasm', 'Miasm'),...
seshat.apps.crisisdb.models.US_STATE_CHOICES = (('AL', 'Alabama'), ('AK', 'Alaska'), ('AZ', 'Arizona'), ('AR', 'Arkansas'), ('CA',...
seshat.apps.crisisdb.models.VIOLENCE_TYPE_CHOICES = (('lynching', 'lynching'), ('riot', 'riot'), ('executions', 'executions'), ('war', 'war'),...