Skip to content

Segment Model

Jacob deGroot-Maggetti edited this page Nov 8, 2022 · 11 revisions

Segment (code) is a model in the main_app app. It inherits from BaseModel.

Each source is associated with a segment object. OldCantus was composed of two databases: CANTUS Database proper, and the Bower Sequence Database. Cantus Database has one segment for each of these two old databases: Sources indexed as part of CANTUS Database proper are assigned to the segment with ID 4063, while sources indexed as part of the Bower database are assigned to the segment with ID 4064. When new sources are created, they are automatically assigned to the 4063 segment.

Fields

  • name: a string. Either "CANTUS Database" or "Bower Sequence Database".
  • inherited from BaseModel:
    • date_created
    • date_updated
    • created_by
    • last_updated_by

Methods

  • inherited from BaseModel:
    • save()
    • display_name (property)
    • get_absolute_url()
    • get_verbose_name()
    • get_verbose_name_plural()
    • get_fields_and_properties()