seshat.apps.crisisdb.models
Attributes
Classes
Model representing an agricultural population. |
|
Model representing an arable land. |
|
Model representing an arable land per farmer. |
|
Model representing a crisis consequence. |
|
Model representing a crop failure event. |
|
Model representing a disease outbreak. |
|
Model representing a drought event. |
|
Model representing an external conflict. |
|
Model representing an external conflict side. |
|
Model representing a famine event. |
|
Model representing a GDP value per capita. |
|
Model representing a gross grain shared per agricultural population. |
|
Model representing a human sacrifice. |
|
Model representing an internal conflict. |
|
Model representing a locust event. |
|
Model representing a military expense. |
|
Model representing a net grain shared per agricultural population. |
|
Model representing a power transition. |
|
Model representing a silver inflow. |
|
Model representing a silver stock. |
|
Model representing a socioeconomic turmoil event. |
|
Model representing a surplus. |
|
Model representing a total population. |
|
Model representing a location in the US. |
|
Model representing a violence event in the US. |
|
Model representing a data source for violence in the US. |
|
Model representing a subtype of violence in the US. |
Functions
|
This function is used to return the name of the model instance (in lieu of |
|
This function is used to validate the year_from and year_to fields of the |
|
|
|
|
|
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.SeshatCommonModel 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.SeshatCommonModel representing an arable land.
- 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.SeshatCommonModel 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.SeshatCommonModel 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.SeshatCommonModel 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.SeshatCommonModel representing a disease outbreak.
- 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.SeshatCommonModel representing a drought event.
- 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.SeshatCommonModel 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.SeshatCommonModel 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.SeshatCommonModel representing a famine event.
- 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.SeshatCommonModel representing a GDP value per capita.
- 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
Bases:
seshat.apps.core.models.SeshatCommonModel representing a gross grain shared per agricultural population.
- Noindex:
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.
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
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
- class seshat.apps.crisisdb.models.Human_sacrifice
Bases:
seshat.apps.core.models.SeshatCommonModel 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.SeshatCommonModel 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.SeshatCommonModel representing a locust event.
- 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.SeshatCommonModel representing a military expense.
- 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
Bases:
seshat.apps.core.models.SeshatCommonModel representing a net grain shared per agricultural population.
- Noindex:
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.
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
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
- class seshat.apps.crisisdb.models.Power_transition
Bases:
seshat.apps.core.models.SeshatCommonModel 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.SeshatCommonModel representing a silver inflow.
- 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.SeshatCommonModel representing a silver stock.
- 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.SeshatCommonModel 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.SeshatCommonModel representing a 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.SeshatCommonModel representing a total population.
- 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.ModelModel representing a location in the US.
- attention_tag
- city
- county
- special_place
- us_state
- class seshat.apps.crisisdb.models.Us_violence
Bases:
django.db.models.ModelModel representing a violence event in the US.
- 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.ModelModel representing a data source for violence in the US.
- abbreviation
- attention_tag
- is_uncertain
- name
- url_address
- class seshat.apps.crisisdb.models.Us_violence_subtype
Bases:
django.db.models.ModelModel representing a subtype of violence in the US.
- 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'),...