Skip to content
Jacob deGroot-Maggetti edited this page Oct 11, 2022 · 44 revisions

A list of views CantusDB uses.

main_app

Views related to main_app models, as well as those related to User, are defined in /main_app/views/ (view directory)

Century views

Views related to Centuries are defined in /main_app/views/century.py (view file)

CenturyDetailView

The Century Detail View (code) displays a list of Sources belonging to a particular Century.

It can be accessed by clicking on the "Century" link in the right sidebar of the Source Detail View, or directly at /century/<id> (example: http://206.12.93.196/century/3841).

It uses the chant_detail.html template (code).

Chant views

Views related to Chants views are defined in /main_app/views/chant.py (view file)

ChantDetailView

The Chant Detail View (code) displays information on a single Chant object.

It can be accessed at /chant/<id> (example: http://206.12.93.196/chant/243157).

It uses the chant_detail.html template (code).

ChantListView

The Chant List View (code) displays a list of Chant objects from a specified Source, which can be filtered by Feast, Genre, folio and/or text using optional GET parameters.

It can be accessed via /chants/?source=<id>, followed by any combination of &feast=<id>, &genre=<id>, &folio=<folio> and &search_text=<text> (examples: http://206.12.93.196/chants/?source=123610, http://206.12.93.196/chants/?source=123610&feast=1975&search_text=audivi&genre=162).

It uses the chant_list.html template (code).

ChantByCantusIDView

The Chant by Cantus ID View (code) displays a list of all Chants with a given Cantus ID.

It can be accessed via /id/<cantus ID> (example: http://206.12.93.196/id/007957).

It uses the chant_seq_by_cantus_id.html template (code).

ChantSearchView

The Chant Search View (code) displays a list of Chants matching the provided search terms.

It can be accessed via /chant-search/ (example: http://206.12.93.196/chant-search/)

It uses the chant_search.html template (code), which is also used by the chant search manuscript view.

MelodySearchView

The Melody Search View (code) allows users to search for chants beginning with or containing a specified melody.

It can be accessed via /melody/ (example: http://206.12.93.196/melody/).

It uses the melody_search.html template (code).

ChantSearchMSView

The Chant Search Manuscript View (code) searches for chants in a specified source.

It can be accessed via /chant-search-ms/<source id> (example: http://206.12.93.196/chant-search-ms/123610).

It uses the chant_search.html template (code), which is also used by the Chant Search View.

ChantCreateView

The Chant Create View (code) allows users to create new chants in a specified source.

It can be accessed via /chant-create/<source id> (example: http://206.12.93.196/chant-create/699578).

It uses the chant_create.html template (code).

The chant create view has a number of functions defined within it, which serve to streamline the user experience of creating chants:

  • get_initial() gathers information on the chant that was most recently created in that source, allowing the folio, feast, sequence_number, and image_link fields to be pre-populated upon page load.
  • get_suggested_chants() takes the chant that was most recently created in the source, and gathers a list of Cantus IDs of chants that often follow that chant in other sources. These Cantus IDs, along with sample texts, are then displayed in the right sidebar of the page - if the user clicks on the button beneath one of these Cantus IDs, it populates many of the fields on the page using data taken from Cantus Index.
  • get_suggested_feasts() takes the feast of the chant that was most recently created in the source, and gathers a list of feasts that tend to follow that feast in other manuscripts. This allows a list of commonly-following feasts to be displayed as links beneath the "Feast:" selector, which populate that selector when clicked.

ChantDeleteView

The Chant Delete View (code) was created for testing purposes, providing detail on when a chant object was created and last modified, and prompting the user to confirm they wish to delete the chant.

It can be accessed by replacing the /chant/ in the url of any chant detail page with /chant-delete/ (e.g. http://206.12.93.196/chant/699579 > http://206.12.93.196/chant-delete/699579)

It uses the chant_confirm_delete.html template (code).

CISearchView

The Cantus Index Search View (code) displays data from Cantus Index on all chants containing a specified string. It is not meant to be accessed directly, rather, it is meant to be launched by clicking the "Search ID" button in the "Input Tool" sidebar on the chant create view, where it is used to populate the "Manuscript Reading Full Text" field.

If you need to access it directly, it can be reached via /ci-search/<string> (example: http://206.12.93.196/ci-search/puer).

It uses the ci_search.html template (code).

ChantIndexView

The Chant Index View (code) displays a table listing all chants in a specified source.

It can be accessed via /index/?source=<id> (example: http://206.12.93.196/index/?source=123610).

It uses the chant_index.html template (code).

ChantEditVolpianoView

ChantProofreadView

ChantEditSyllabificationView

Feast views

Views related to Feasts are defined in /main_app/views/feast.py (view file)

FeastDetailView

FeastListView

Genre views

Views related to Genres views are defined in /main_app/views/genre.py (view file)

GenreDetailView

GenreListView

Indexer views

Views related to Indexers views are defined in /main_app/views/indexer.py (view file)

IndexerDetailView

IndexerListView

Notation views

Views related to Notations views are defined in /main_app/views/notation.py (view file)

NotationDetailView

Office views

Views related to Offices views are defined in /main_app/views/office.py (view file)

OfficeDetailView

OfficeListView

Provenance views

Views related to Provenances views are defined in /main_app/views/provenance.py (view file)

ProvenanceDetailView

Sequence views

Views related to Sequences views are defined in /main_app/views/sequence.py (view file)

SequenceDetailView

SequenceListView

SequenceEditView

Source views

Views related to Sources views are defined in /main_app/views/source.py (view file)

SourceDetailView

SourceListView

SourceCreateView

SourceEditView

User views

User views are defined in /main_app/views/user.py (view file)

UserDetailView

UserSourceListView

CustomLogoutView

UserListView

CustomLoginView

Other views

Other views are defined in /main_app/views/views.py (view file)

Items Count Page

Contact Us Page

Change Password Page

csv_export API

See APIs > CantusDB APIs > csv_export.

json_node_export API

See APIs > CantusDB APIs > json_node_export.

json_sources_export API

See APIs > CantusDB APIs > json_sources_export.

json_nextchants API

See APIs > CantusDB APIs > json_nextchants.

articles

Views related to Articles are defined in /articles/views.py (view file)

ArticleDetailView

ArticleListView

users

See User views above.