Skip to content

Source Model

Jacob deGroot-Maggetti edited this page Oct 11, 2022 · 25 revisions

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

A Source object represents a single manuscript or manuscript fragment containing chants/sequences.

Views

Source has a Detail view, a List, a Create view, and an Edit view. Sources also feature prominently on the Century, Notation and Provenance detail views.

Fields

  • published: a Boolean field, dictating whether or not a source, or the chants/sequences contained within it, can be viewed by users who are not logged in. OldCantus previously used two fields to dictate whether sources/chants/sequences should be visible to anonymous users; these fields have been combined into one in CantusDB
  • title: a string, usually indicating where the manuscript is currently held. Examples include Philadelphia, Free Library of Philadelphia, Lewis E M 1:16 and Mascouche (Quebec, Canada), Private collections, D-06b7w (fragment).
  • siglum: a string, indicating where the source is stored. Occasionally, it duplicates the source's RismSiglum's name, but more often, it consists of the source's associated RismSiglum's name followed by a shelf mark. Examples include P-La, CH-Fco 2, F-Pn 1086, GB-Ob Can. Lit. 202, and CDN-MasQCpc D-06b7w (fragment).
  • rism_siglum: a ForeignKey field, pointing to a RismSiglum object.
  • provenance: a ForeignKey field, pointing to a Provenance object. Represents the geographic area from which the source came.
  • provenance_notes: a string clarifying or adding information about the source's provenance.
  • full_source: Has three options: "Yes", "No", and "Unknown".
  • date: represents when the manuscript was created.
  • century: a ForeignKey field, pointing to a Century object. Represents the time period during which the manuscript was created.
  • notation: a ForeignKey field, pointing to a Notation object. Represents, in short, how the neumes in the source are written.
  • cursus: A list of possible values of source_status is stored in the cursus_choices attribute below.
  • current_editors
  • inventoried_by
  • melodies_entered_by
  • proofreaders
  • other_editors
  • segment: a ForeignKey field, pointing to a Segment object. Represents the database for which the source was initially indexed.
  • source_status: how far through the process of indexing/transcribing/proofreading/publishing the source is. A list of possible values of source_status is stored in the source_status_choices attribute below.
  • complete_inventory: has two options: "Yes", and "No".
  • summary: a string, consisting of a brief description of the manuscript.
  • liturgical_occasions: a string, usually outlining which feasts the manuscript has chants for and indicating what pages those feasts are on.
  • description: a string, consisting of a description of the manuscript.
  • selected_bibliography: a string, often containing html tags, listing publications that refer to the manuscript are listed. In spite of the HTML, we currently store this as plaintext.
  • image_link: a url pointing to a place where scans of the manuscript's pages can be viewed.
  • indexing_notes: a string with notes on the indexing process, often indicating who transcribed and proofread the source.
  • indexing_date: a string indicating when the source was indexed. Examples include Fall 2020, by 1997, and posted online November 2013; MS description posted 16 Nov 2019;
  • json_info: stores a json object encoding all the information from OldCantus on the source. This field is populated by the sync_chants and sync_sequences management commands as they pull data from OldCantus's json-node API.
  • fragmentarium_id: a short string. Likely used to refer to items in the Fragmentarium database.
  • dact_id: a short string. Likely used as a concordance for something associated with the Digital Analysis of Chant Transmission project.
  • number_of_chants: A tally of how many chants/sequences the source contains. This field is automatically kept up-to-date as the database changes by the update_source_chant_count() function in signals.py (see file).
  • number_of_melodies: A tally of how many chants in this source have volpiano. This field is automatically kept up-to-date as the database changes by the update_source_melody_count() function in signals.py (see file).
  • inherited from BaseModel:
    • date_created
    • date_updated
    • created_by
    • last_updated_by

Attributes

  • cursus_choices: a list of possible values of the cursus field
  • source_status_choices: a list of possible values of the source_status field

Methods

  • save(): Overwrites/extends BaseModel's save method, ensuring that new chants are automatically assigned to the "Cantus Database" Segment.
  • inherited from BaseModel:
    • display_name (property)
    • get_absolute_url()
    • get_verbose_name()
    • get_verbose_name_plural()
    • get_fields_and_properties()