diff --git a/django/cantusdb_project/main_app/admin/__init__.py b/django/cantusdb_project/main_app/admin/__init__.py index 6839ad2d8..994faadaa 100644 --- a/django/cantusdb_project/main_app/admin/__init__.py +++ b/django/cantusdb_project/main_app/admin/__init__.py @@ -6,7 +6,6 @@ from main_app.admin.notation import NotationAdmin from main_app.admin.office import OfficeAdmin from main_app.admin.provenance import ProvenanceAdmin -from main_app.admin.rism_siglum import RismSiglumAdmin from main_app.admin.segment import SegmentAdmin from main_app.admin.sequence import SequenceAdmin from main_app.admin.source import SourceAdmin diff --git a/django/cantusdb_project/main_app/admin/rism_siglum.py b/django/cantusdb_project/main_app/admin/rism_siglum.py deleted file mode 100644 index 36113bec8..000000000 --- a/django/cantusdb_project/main_app/admin/rism_siglum.py +++ /dev/null @@ -1,11 +0,0 @@ -from django.contrib import admin - -from main_app.admin.base_admin import BaseModelAdmin -from main_app.forms import AdminRismSiglumForm -from main_app.models import RismSiglum - - -@admin.register(RismSiglum) -class RismSiglumAdmin(BaseModelAdmin): - search_fields = ("name",) - form = AdminRismSiglumForm diff --git a/django/cantusdb_project/main_app/forms.py b/django/cantusdb_project/main_app/forms.py index 41abb97b3..4b7222c7a 100644 --- a/django/cantusdb_project/main_app/forms.py +++ b/django/cantusdb_project/main_app/forms.py @@ -7,7 +7,6 @@ Notation, Feast, Source, - RismSiglum, Segment, Provenance, Century, @@ -176,7 +175,6 @@ class Meta: model = Source fields = [ "title", - "rism_siglum", "siglum", "provenance", "provenance_notes", @@ -213,7 +211,6 @@ class Meta: "fragmentarium_id": TextInputWidget(), "dact_id": TextInputWidget(), "indexing_notes": TextAreaWidget(), - "rism_siglum": autocomplete.ModelSelect2(url="rismsiglum-autocomplete"), "current_editors": autocomplete.ModelSelect2Multiple( url="current-editors-autocomplete" ), @@ -365,7 +362,6 @@ class Meta: model = Source fields = [ "title", - "rism_siglum", "siglum", "provenance", "provenance_notes", @@ -391,7 +387,6 @@ class Meta: ] widgets = { "title": TextInputWidget(), - "rism_siglum": autocomplete.ModelSelect2(url="rismsiglum-autocomplete"), "siglum": TextInputWidget(), "provenance": autocomplete.ModelSelect2(url="provenance-autocomplete"), "provenance_notes": TextInputWidget(), @@ -634,14 +629,6 @@ class Meta: name = forms.CharField(required=True, widget=TextInputWidget) -class AdminRismSiglumForm(forms.ModelForm): - class Meta: - model = RismSiglum - fields = "__all__" - - name = forms.CharField(required=True, widget=TextInputWidget) - - class AdminSegmentForm(forms.ModelForm): class Meta: model = Segment @@ -704,11 +691,6 @@ class Meta: help_text="RISM-style siglum + Shelf-mark (e.g. GB-Ob 202).", ) - rism_siglum = forms.ModelChoiceField( - queryset=RismSiglum.objects.all().order_by("name"), - required=False, - ) - provenance = forms.ModelChoiceField( queryset=Provenance.objects.all().order_by("name"), required=False, diff --git a/django/cantusdb_project/main_app/migrations/0019_remove_source_rism_siglum_delete_rismsiglum.py b/django/cantusdb_project/main_app/migrations/0019_remove_source_rism_siglum_delete_rismsiglum.py new file mode 100644 index 000000000..02763726b --- /dev/null +++ b/django/cantusdb_project/main_app/migrations/0019_remove_source_rism_siglum_delete_rismsiglum.py @@ -0,0 +1,20 @@ +# Generated by Django 4.2.11 on 2024-06-13 11:43 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("main_app", "0018_institution_former_sigla"), + ] + + operations = [ + migrations.RemoveField( + model_name="source", + name="rism_siglum", + ), + migrations.DeleteModel( + name="RismSiglum", + ), + ] diff --git a/django/cantusdb_project/main_app/models/__init__.py b/django/cantusdb_project/main_app/models/__init__.py index 9959354e9..35e764e0c 100644 --- a/django/cantusdb_project/main_app/models/__init__.py +++ b/django/cantusdb_project/main_app/models/__init__.py @@ -9,7 +9,6 @@ from main_app.models.provenance import Provenance from main_app.models.segment import Segment from main_app.models.sequence import Sequence -from main_app.models.rism_siglum import RismSiglum from main_app.models.source import Source from main_app.models.institution import Institution from main_app.models.institution_identifier import InstitutionIdentifier diff --git a/django/cantusdb_project/main_app/models/rism_siglum.py b/django/cantusdb_project/main_app/models/rism_siglum.py deleted file mode 100644 index ecfa4339f..000000000 --- a/django/cantusdb_project/main_app/models/rism_siglum.py +++ /dev/null @@ -1,22 +0,0 @@ -from django.db import models -from main_app.models import BaseModel - - -class RismSiglum(BaseModel): - """The `RismSiglum` model, a foreign key to the `Source` model - - The `name` attribute takes the form of Country code, a dash, an indicator of a city in uppercase, - and an indicator of an institution in lower-case. - - Example: GB-Lbl stands for Great Britain, London, British Library - """ - - name = models.CharField(max_length=255) - description = models.TextField(null=True, blank=True) - - class Meta: - verbose_name = "RISM siglum" - verbose_name_plural = "RISM sigla" - - def __str__(self): - return self.name diff --git a/django/cantusdb_project/main_app/models/source.py b/django/cantusdb_project/main_app/models/source.py index e49363306..30abb038f 100644 --- a/django/cantusdb_project/main_app/models/source.py +++ b/django/cantusdb_project/main_app/models/source.py @@ -37,13 +37,6 @@ class Source(BaseModel): blank=False, help_text="RISM-style siglum + Shelf-mark (e.g. GB-Ob 202).", ) - # the RISM siglum uniquely identifies a library or holding institution - rism_siglum = models.ForeignKey( - "RismSiglum", - on_delete=models.PROTECT, - null=True, - blank=True, - ) holding_institution = models.ForeignKey( "Institution", on_delete=models.PROTECT, diff --git a/django/cantusdb_project/main_app/templates/content_overview.html b/django/cantusdb_project/main_app/templates/content_overview.html index ca8b01532..1d4ec3c86 100644 --- a/django/cantusdb_project/main_app/templates/content_overview.html +++ b/django/cantusdb_project/main_app/templates/content_overview.html @@ -47,7 +47,7 @@