diff --git a/django/cantusdb_project/main_app/forms.py b/django/cantusdb_project/main_app/forms.py index 8ec2597c7..ad150622b 100644 --- a/django/cantusdb_project/main_app/forms.py +++ b/django/cantusdb_project/main_app/forms.py @@ -89,13 +89,14 @@ class CantusDBLatinField(forms.CharField): def validate(self, value): super().validate(value) - if value: - try: - syllabify_text(value) - except LatinError as err: - raise forms.ValidationError(str(err)) - except ValueError as exc: - raise forms.ValidationError("Invalid characters in text.") from exc + # Temporarily turn off validation; see #1674 + # if value: + # try: + # syllabify_text(value) + # except LatinError as err: + # raise forms.ValidationError(str(err)) + # except ValueError as exc: + # raise forms.ValidationError("Invalid characters in text.") from exc class CantusDBSyllabifiedLatinField(forms.CharField): @@ -107,11 +108,12 @@ class CantusDBSyllabifiedLatinField(forms.CharField): def validate(self, value): super().validate(value) - if value: - try: - syllabify_text(value, text_presyllabified=True) - except ValueError as exc: - raise forms.ValidationError("Invalid characters in text.") from exc + # Temporarily turn off validation; see #1674 + # if value: + # try: + # syllabify_text(value, text_presyllabified=True) + # except ValueError as exc: + # raise forms.ValidationError("Invalid characters in text.") from exc class StyledChoiceField(forms.ChoiceField): diff --git a/django/cantusdb_project/main_app/templates/chant_create.html b/django/cantusdb_project/main_app/templates/chant_create.html index 4b29bb0bb..69f36bc25 100644 --- a/django/cantusdb_project/main_app/templates/chant_create.html +++ b/django/cantusdb_project/main_app/templates/chant_create.html @@ -291,7 +291,7 @@

Create Chant

{% block lowersidebar %}
-
{{ source.siglum }}
+
{{ source.short_heading }}
diff --git a/django/cantusdb_project/main_app/templates/chant_detail.html b/django/cantusdb_project/main_app/templates/chant_detail.html index a46a18156..8dc281851 100644 --- a/django/cantusdb_project/main_app/templates/chant_detail.html +++ b/django/cantusdb_project/main_app/templates/chant_detail.html @@ -38,7 +38,7 @@

{{ chant.incipit }}

Source
- {{ chant.source.title }} + {{ chant.source.heading }}
{% endif %} @@ -312,7 +312,7 @@

List of melodies

Source navigation
{% if source %} - {{ source.siglum }} + {{ source.short_heading }} {% else %} This chant is not associated with any source. {% endif %} @@ -465,7 +465,7 @@

List of melodies

{{ source.segment.name }}
- {{ source.siglum }} + {{ source.short_heading }}
diff --git a/django/cantusdb_project/main_app/templates/chant_edit.html b/django/cantusdb_project/main_app/templates/chant_edit.html index 47860c7d5..987e398e6 100644 --- a/django/cantusdb_project/main_app/templates/chant_edit.html +++ b/django/cantusdb_project/main_app/templates/chant_edit.html @@ -2,7 +2,7 @@ {% load static %} {% block title %} - {{ source.title }} | Cantus Database + {{ source.heading }} | Cantus Database {% endblock %} {% block scripts %} @@ -362,8 +362,8 @@

Full text & Volpiano edit form

5) Click "SAVE"
- - {{ source.siglum }} + + {{ source.short_heading }}
@@ -382,7 +382,7 @@

Full text & Volpiano edit form

{% block lowersidebar %}
{% if source.chant_set.exists %} diff --git a/django/cantusdb_project/main_app/templates/full_inventory.html b/django/cantusdb_project/main_app/templates/full_inventory.html index 07ee1827e..e018a2a5b 100644 --- a/django/cantusdb_project/main_app/templates/full_inventory.html +++ b/django/cantusdb_project/main_app/templates/full_inventory.html @@ -20,7 +20,7 @@ Inventory | Cantus Database

Cantus Inventory: - {{ source.title }} + {{ source.heading }}

This source inventory contains {{ chants.count }} chants. diff --git a/django/cantusdb_project/main_app/templates/source_edit.html b/django/cantusdb_project/main_app/templates/source_edit.html index b953367b5..ecc7539f2 100644 --- a/django/cantusdb_project/main_app/templates/source_edit.html +++ b/django/cantusdb_project/main_app/templates/source_edit.html @@ -250,7 +250,7 @@

{% block lowersidebar %}
-

{{ source.siglum }}

+

{{ source.short_heading }}

diff --git a/django/cantusdb_project/main_app/templates/user_detail.html b/django/cantusdb_project/main_app/templates/user_detail.html index 260a41654..16735d703 100644 --- a/django/cantusdb_project/main_app/templates/user_detail.html +++ b/django/cantusdb_project/main_app/templates/user_detail.html @@ -64,7 +64,7 @@
Entered Melodies
diff --git a/django/cantusdb_project/main_app/tests/test_views/test_chant.py b/django/cantusdb_project/main_app/tests/test_views/test_chant.py index d91ef212c..9692c8e36 100644 --- a/django/cantusdb_project/main_app/tests/test_views/test_chant.py +++ b/django/cantusdb_project/main_app/tests/test_views/test_chant.py @@ -3,6 +3,7 @@ """ from unittest.mock import patch +from unittest import skip import random from typing import ClassVar @@ -322,6 +323,7 @@ def test_proofread_chant(self): chant.refresh_from_db() self.assertIs(chant.manuscript_full_text_std_proofread, True) + @skip("Temporarily disabled due to #1674") def test_invalid_text(self) -> None: """ The user should not be able to create a chant with invalid text @@ -3000,6 +3002,7 @@ def test_suggested_chant_buttons(self) -> None: ) self.assertIsNone(response_after_rare_chant.context["suggested_chants"]) + @skip("Temporarily disabled due to #1674") def test_invalid_text(self) -> None: """ The user should not be able to create a chant with invalid text diff --git a/poetry.lock b/poetry.lock index ee432f035..972b80c3d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "asgiref" @@ -295,13 +295,13 @@ profile = ["gprof2dot (>=2022.7.29)"] [[package]] name = "django" -version = "4.2.14" +version = "4.2.16" description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design." optional = false python-versions = ">=3.8" files = [ - {file = "Django-4.2.14-py3-none-any.whl", hash = "sha256:3ec32bc2c616ab02834b9cac93143a7dc1cdcd5b822d78ac95fc20a38c534240"}, - {file = "Django-4.2.14.tar.gz", hash = "sha256:fc6919875a6226c7ffcae1a7d51e0f2ceaf6f160393180818f6c95f51b1e7b96"}, + {file = "Django-4.2.16-py3-none-any.whl", hash = "sha256:1ddc333a16fc139fd253035a1606bb24261951bbc3a6ca256717fa06cc41a898"}, + {file = "Django-4.2.16.tar.gz", hash = "sha256:6f1616c2786c408ce86ab7e10f792b8f15742f7b7b7460243929cb371e7f1dad"}, ] [package.dependencies] @@ -1233,4 +1233,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "fbe3fac1c7832205a947ed49a6f88f2b4336e8bd0b4e4db6cd99d3267f86e017" +content-hash = "609a4bf7dcbd8a3e7a92a8c41b0761b99542bbeb7267b3402a062a1f5e7cb9d0" diff --git a/pyproject.toml b/pyproject.toml index ef835341e..ca6031da2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ package-mode = false [tool.poetry.dependencies] python = "^3.9" -Django = "4.2.14" +Django = "4.2.16" django-autocomplete-light = "3.9.4" django-extra-views = "0.13.0" django-quill-editor = "0.1.40"