-
Notifications
You must be signed in to change notification settings - Fork 6
Views
A list of views CantusDB uses.
Views related to main_app
models, as well as those related to User, are defined in /main_app/views/
(view directory)
Views related to Centuries are defined in /main_app/views/century.py
(view file)
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).
Views related to Chants are defined in /main_app/views/chant.py
(view file)
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).
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).
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).
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.
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).
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.
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 thefolio
,feast
,sequence_number
, andimage_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.
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).
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).
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).
The Source Edit Chants View is the main view for editing chants.
It can be accessed via /edit-chants/<source id>
(example: http://206.12.93.196/edit-chants/699578. Optional ?folio= and ?feast= query strings can be appended to the URL, which filter results from the source by feast and folio respectively. To actively edit a chant, a ?pk= query string is included in the URL; in order for this to work, either a feast or a folio must be specified among the query parameters.
It uses the chant_edit.html
template (code).
This view used to be called (confusingly, as there was also a ChantEditView in the past) ChantEditVolpianoView. It is now called the Source Edit Chants View: the main part of its URL is a Source ID, and it allows editing of all chants within a source. It lives in views/chants.py because it is the primary view for editing chants.
The Chant Proofread View is similar to the Source Edit Chants View - the main difference is that in addition to many of the fields on the Source Edit Chants View, there are checkboxes to change the proofread status of several fields. URLs are formed in the same manner as the Source Edit Chants View, substituting /proofread-chant
for /edit-chants
.
It uses the chant_proofread.html
template (code).
Views related to Feasts are defined in /main_app/views/feast.py
(view file)
Views related to Genres are defined in /main_app/views/genre.py
(view file)
Views related to Indexers are defined in /main_app/views/indexer.py
(view file)
Views related to Notations are defined in /main_app/views/notation.py
(view file)
Views related to Offices are defined in /main_app/views/office.py
(view file)
Views related to Provenances are defined in /main_app/views/provenance.py
(view file)
Views related to Sequences are defined in /main_app/views/sequence.py
(view file)
Views related to Sources are defined in /main_app/views/source.py
(view file)
The Source Edit Chants View is the primary view for editing chants. For more information, see SourceEditChantsView above.
User views are defined in /main_app/views/user.py
(view file)
Other views are defined in /main_app/views/views.py
(view file)
See APIs > CantusDB APIs > csv_export
.
See APIs > CantusDB APIs > json_node_export
.
See APIs > CantusDB APIs > json_sources_export
.
See APIs > CantusDB APIs > json_nextchants
.
Views related to Articles are defined in /articles/views.py
(view file)
See User views above.