DDMAL / CantusDB

A new site for Cantus Database running under Django.
https://cantusdatabase.org
MIT License
5 stars 6 forks source link

Add `Project` model for chants & return segment to a source-level object #1548

Closed dchiller closed 1 week ago

dchiller commented 1 month ago

Closes #1541. Removes the segment field from the BaseChant model. With this PR, segment returns to a property of sources, not changes.

Closes #1542. Adds the Project model and the project field as a foreign key on BaseChant. A chant's project can be used to designate that it is part of a particular inventorying project or to designate that certain specific fields are relevant to that chant (for example, chants in the "Benedicamus Domino" project have additional fields shown on the Chant Create and Chant Edit pages. Functionality for special Benedicamus Domino fields that had been commented out in #1521 have been restored. Modifies test functions, including make_fake_chant to reflect this change.

This PR also add the assign_sequences_to_bower_project command to assign existing Sequences to the "Clavis Sequentiarum" project. It removes the assign_chants_to_segments command as no longer necessary. Relevant tests are added and removed respectively for these commands.

NOTE: The two current projects, "Clavis Sequentiarum" and "Benedicamus Domino", require manually adding these projects through the Admin panel before Chants can be assigned to those projects.

While I was thinking about sequences, also closes #1544.

dchiller commented 4 weeks ago

Thanks for taking a look! Yeah, I’ve been meaning to get to the tests. I’ll figure those out and alert you if it means anything substantive has to change.