seshat.apps.core.models
Attributes
Classes
Model representing a capital. |
|
Model representing a specific citation. |
|
Model representing Cliopatria polity borders dataset. |
|
Model representing a country. |
|
Model representing a country (GADM). |
|
Model representing a province (GADM). |
|
Model representing a macro region. |
|
Model representing a NGA. |
|
Model representing a relationship between a NGA and a polity. |
|
Model representing a polity. |
|
Model Representing a reference. |
|
Model representing a religion. |
|
Model representing a through model for the many-to-many relationship between |
|
Model representing a section. |
|
Model representing a comment. |
|
Model representing a part of a comment. |
|
Model representing a common Seshat model. |
|
Model representing a private comment. |
|
Model representing a part of a private comment. |
|
Model representing a Seshat region. |
|
Model representing a subsection. |
|
Model representing a variable hierarchy. |
Functions
|
Returns a color for a given expert. |
This function is used to return the citations of the model instance |
|
Returns a string of all the citations for a comment. |
|
Returns the number of citations for a comment. |
|
Returns the number of citations for a comment. |
Module Contents
- class seshat.apps.core.models.Capital
Bases:
django.contrib.gis.db.models.Model
Model representing a capital.
- 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
- alternative_names
- current_country
- is_verified
- latitude
- longitude
- name
- note
- url_on_the_map
- year_from
- year_to
- class seshat.apps.core.models.Citation
Bases:
django.contrib.gis.db.models.Model
Model representing a specific citation.
- full_citation_display()
Returns a string of the full citation. If the citation has a title, it is included in the string. If the citation has a creator, it is included in the string. If the citation has a year, it is included in the string. If the citation has a page_from, it is included in the string. If the citation has a page_to, it is included in the string.
- Returns:
A string of the full citation.
- 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
- save(*args, **kwargs)
Saves the citation to the database.
- Parameters:
*args – Additional arguments.
**kwargs – Additional keyword arguments.
- Raises:
IntegrityError – If the citation cannot be saved to the database.
- Returns:
None
- zoteroer()
Returns the Zotero link for the citation.
- Returns:
The Zotero link for the citation.
- Return type:
str
- property citation_short_title
Returns a short title for the citation. If the title is longer than 40 characters, it is truncated. If the title is not provided, a default title is returned.
- Returns:
A short title for the citation.
- Return type:
str
- created_date
- id
- modified_date
- page_from
- page_to
- ref
- class seshat.apps.core.models.Cliopatria
Bases:
django.contrib.gis.db.models.Model
Model representing Cliopatria polity borders dataset.
- area
- colour
- components
- end_year
- geom
- id
- member_of
- name
- polity_end_year
- polity_start_year
- seshat_id
- simplified_geom
- start_year
- wikipedia_name
- class seshat.apps.core.models.Country
Bases:
django.contrib.gis.db.models.Model
Model representing a country.
- class Meta
- Noindex:
- unique_together = ('name',)
- verbose_name = 'country'
- verbose_name_plural = 'countries'
- name
- polity
- class seshat.apps.core.models.GADMCountries
Bases:
django.contrib.gis.db.models.Model
Model representing a country (GADM).
- COUNTRY
- geom
- class seshat.apps.core.models.GADMProvinces
Bases:
django.contrib.gis.db.models.Model
Model representing a province (GADM).
- COUNTRY
- ENGTYPE_1
- NAME_1
- geom
- class seshat.apps.core.models.GADMShapefile
Bases:
django.contrib.gis.db.models.Model
- CC_1
- CC_2
- CC_3
- CC_4
- CC_5
- CONTINENT
- COUNTRY
- DISPUTEDBY
- ENGTYPE_1
- ENGTYPE_2
- ENGTYPE_3
- ENGTYPE_4
- ENGTYPE_5
- GID_0
- GID_1
- GID_2
- GID_3
- GID_4
- GID_5
- GOVERNEDBY
- HASC_1
- HASC_2
- HASC_3
- ISO_1
- NAME_0
- NAME_1
- NAME_2
- NAME_3
- NAME_4
- NAME_5
- NL_NAME_1
- NL_NAME_2
- NL_NAME_3
- REGION
- SOVEREIGN
- SUBCONT
- TYPE_1
- TYPE_2
- TYPE_3
- TYPE_4
- TYPE_5
- UID
- VALIDFR_1
- VALIDFR_2
- VALIDFR_3
- VALIDFR_4
- VARNAME_0
- VARNAME_1
- VARNAME_2
- VARNAME_3
- VARNAME_4
- VARREGION
- geom
- class seshat.apps.core.models.Macro_region
Bases:
django.contrib.gis.db.models.Model
Model representing a macro region.
- name
- class seshat.apps.core.models.Nga
Bases:
django.contrib.gis.db.models.Model
Model representing a NGA.
- 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
- capital_city
- fao_country
- latitude
- longitude
- name
- nga_code
- subregion
- world_region
- class seshat.apps.core.models.Ngapolityrel
Bases:
django.contrib.gis.db.models.Model
Model representing a relationship between a NGA and a polity.
- is_home_nga
- name
- nga_party
- polity_party
- year_from
- year_to
- class seshat.apps.core.models.Polity
Bases:
django.contrib.gis.db.models.Model
Model representing a polity.
- class Meta
- Noindex:
- ordering = ['long_name']
- unique_together = ('name',)
- verbose_name = 'polity'
- verbose_name_plural = 'polities'
- clean()
Verifies a number of conditions on the start and end years of the polity.
- Raises:
ValidationError – If the start year is greater than the end year.
ValidationError – If the end year is greater than the current year.
ValidationError – If the start year is greater than the current year.
- Returns:
None
- created_date
- end_year
- general_description
- home_nga
- home_seshat_region
- long_name
- modified_date
- name
- new_name
- polity_tag
- private_comment
- private_comment_n
- shapefile_name
- start_year
- class seshat.apps.core.models.Reference
Bases:
django.contrib.gis.db.models.Model
Model Representing a reference.
- 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
- created_date
- creator
- item_type
- long_name
- modified_date
- property reference_short_title
Returns a short title for the reference. If the title is longer than 60 characters, it is truncated. If the title is not provided, a default title is returned.
- Returns:
A short title for the reference.
- Return type:
str
- title
- url_link
- year
- zotero_link
- class seshat.apps.core.models.Religion
Bases:
django.contrib.gis.db.models.Model
Model representing a religion.
- name
- religion_family
- religion_genus
- religion_name
- class seshat.apps.core.models.ScpThroughCtn
Bases:
django.contrib.gis.db.models.Model
Model representing a through model for the many-to-many relationship between a comment part and a citation.
- citation
- parent_paragraphs
- seshatcommentpart
- class seshat.apps.core.models.Section
Bases:
django.contrib.gis.db.models.Model
Model representing a section.
- name
- class seshat.apps.core.models.SeshatComment
Bases:
django.contrib.gis.db.models.Model
Model representing a comment.
- 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
- zoteroer()
Returns the Zotero link for the comment.
- Returns:
The Zotero link for the comment.
- Return type:
str
- text
- class seshat.apps.core.models.SeshatCommentPart
Bases:
django.contrib.gis.db.models.Model
Model representing a part of a comment.
- 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
- citation_index
- property citations_count
Returns the number of citations for a comment.
- Returns:
The number of citations for a comment.
- Return type:
int
- property citations_count_plus
Returns the number of citations for a comment.
- Returns:
The number of citations for a comment.
- Return type:
int
- comment
- comment_citations
- comment_citations_plus
- comment_curator
- comment_order
- comment_part_text
- property display_citations
Display the citations of the model instance.
- Noindex:
Note
The method is a property, and an alias for the return_citations_for_comments function.
- Returns:
The citations of the model instance, separated by comma.
- Return type:
str
- property display_citations_plus
Returns a string of all the citations for a comment.
- Noindex:
Note
The method is a property, and an alias for the return_citations_for_comments function.
- Returns:
A string of all the citations for a comment.
- Return type:
str
- modified_date
- class seshat.apps.core.models.SeshatCommon
Bases:
django.contrib.gis.db.models.Model
Model representing a common Seshat model.
- citations
- comment
- created_date
- curator
- description
- drb_reviewed
- expert_reviewed
- finalized
- is_disputed
- is_uncertain
- modified_date
- name
- note
- polity
- private_comment
- tag
- year_from
- year_to
- class seshat.apps.core.models.SeshatPrivateComment
Bases:
django.contrib.gis.db.models.Model
Model representing a private comment.
- 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
- text
- class seshat.apps.core.models.SeshatPrivateCommentPart
Bases:
django.contrib.gis.db.models.Model
Model representing a part of a private comment.
- 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
- created_date
- is_done
- last_modified_date
- private_comment
- private_comment_owner
- private_comment_part_text
- private_comment_reader
- class seshat.apps.core.models.Seshat_region
Bases:
django.contrib.gis.db.models.Model
Model representing a Seshat region.
- mac_region
- name
- subregions_list
- class seshat.apps.core.models.Subsection
Bases:
django.contrib.gis.db.models.Model
Model representing a subsection.
- name
- section
- class seshat.apps.core.models.Variablehierarchy
Bases:
django.contrib.gis.db.models.Model
Model representing a variable hierarchy.
- explanation
- is_verified
- name
- section
- subsection
- seshat.apps.core.models.give_me_a_color_for_expert(value)
Returns a color for a given expert.
- Parameters:
value (int) – The id of the expert.
- Returns:
A color for the expert.
- Return type:
str
- seshat.apps.core.models.return_citations_for_comments(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.core.models.return_citations_plus_for_comments(self)
Returns a string of all the citations for a comment.
- Returns:
A string of all the citations for a comment.
- Return type:
str
- seshat.apps.core.models.return_number_of_citations_for_comments(self)
Returns the number of citations for a comment.
- Returns:
The number of citations for a comment.
- Return type:
int
- seshat.apps.core.models.return_number_of_citations_plus_for_comments(self)
Returns the number of citations for a comment.
- Returns:
The number of citations for a comment.
- Return type:
int
- seshat.apps.core.models.AA = 'A'
- seshat.apps.core.models.AP = 'A;P'
- seshat.apps.core.models.APS = 'A;P*'
- seshat.apps.core.models.AS = 'A*'
- seshat.apps.core.models.A_TO_P = 'A~P'
- seshat.apps.core.models.Certainty
- seshat.apps.core.models.NFY = 'NFY'
- seshat.apps.core.models.POLITY_TAG_CHOICES = (('LEGACY', 'Equinox 2020 Polities'), ('POL_AFR_EAST', 'NEW East African Polities'),...
- seshat.apps.core.models.PP = 'P'
- seshat.apps.core.models.PS = 'P*'
- seshat.apps.core.models.P_TO_A = 'P~A'
- seshat.apps.core.models.Tags = (('TRS', 'Confident'), ('SSP', 'Suspected'), ('IFR', 'Inferred'))
- seshat.apps.core.models.U = 'U'
- seshat.apps.core.models.UU = 'U*'
- seshat.apps.core.models.WORLD_REGION_CHOICES = (('Europe', 'Europe'), ('Southwest Asia', 'Southwest Asia'), ('Africa', 'Africa'), ('Central...