diff --git a/config/nginx/conf.d/cantusdb.conf.development b/config/nginx/conf.d/cantusdb.conf.development index 1b8e0b654..972c91519 100644 --- a/config/nginx/conf.d/cantusdb.conf.development +++ b/config/nginx/conf.d/cantusdb.conf.development @@ -23,17 +23,9 @@ server { alias /resources/api_cache/concordances.json; expires modified +24h; } - - location = /style.css { - root /; - } - location = /background.jpg { - root /; - } - location = /CantusLogoSmall.gif { - root /; - } - location = /favicon.ico { + + error_page 500 /500.html; + location = /500.html { root /; } @@ -45,4 +37,4 @@ server { location = /504.html { root /; } -} \ No newline at end of file +} diff --git a/django/cantusdb_project/main_app/forms.py b/django/cantusdb_project/main_app/forms.py index 100027609..41abb97b3 100644 --- a/django/cantusdb_project/main_app/forms.py +++ b/django/cantusdb_project/main_app/forms.py @@ -83,13 +83,14 @@ class Meta: "content_structure", "indexing_notes", "addendum", - "segment", - "liturgical_function", - "polyphony", - "cm_melody_id", - "incipit_of_refrain", - "later_addition", - "rubrics", + # See issue #1521: Temporarily commenting out segment-related functions on Chant + # "segment", + # "liturgical_function", + # "polyphony", + # "cm_melody_id", + # "incipit_of_refrain", + # "later_addition", + # "rubrics", ] # the widgets dictionary is ignored for a model field with a non-empty # choices attribute. In this case, you must override the form field to @@ -148,13 +149,14 @@ class Meta: "Mass Alleluias. Punctuation is omitted.", ) - segment = SelectWidgetNameModelChoiceField( - queryset=Segment.objects.all().order_by("id"), - required=True, - initial=Segment.objects.get(id=4063), # Default to the "Cantus" segment - help_text="Select the Database segment that the chant belongs to. " - "In most cases, this will be the CANTUS segment.", - ) + # See issue #1521: Temporarily commenting out segment-related functions on Chant + # segment = SelectWidgetNameModelChoiceField( + # queryset=Segment.objects.all().order_by("id"), + # required=True, + # initial=Segment.objects.get(id=4063), # Default to the "Cantus" segment + # help_text="Select the Database segment that the chant belongs to. " + # "In most cases, this will be the CANTUS segment.", + # ) # automatically computed fields # source and incipit are mandatory fields in model, @@ -281,13 +283,14 @@ class Meta: "manuscript_full_text_proofread", "volpiano_proofread", "proofread_by", - "segment", - "liturgical_function", - "polyphony", - "cm_melody_id", - "incipit_of_refrain", - "later_addition", - "rubrics", + # See issue #1521: Temporarily commenting out segment-related functions on Chant + # "segment", + # "liturgical_function", + # "polyphony", + # "cm_melody_id", + # "incipit_of_refrain", + # "later_addition", + # "rubrics", ] widgets = { # manuscript_full_text_std_spelling: defined below (required) @@ -317,12 +320,13 @@ class Meta: "proofread_by": autocomplete.ModelSelect2Multiple( url="proofread-by-autocomplete" ), - "polyphony": SelectWidget(), - "liturgical_function": SelectWidget(), - "cm_melody_id": TextInputWidget(), - "incipit_of_refrain": TextInputWidget(), - "later_addition": TextInputWidget(), - "rubrics": TextInputWidget(), + # See issue #1521: Temporarily commenting out segment-related functions on Chant + # "polyphony": SelectWidget(), + # "liturgical_function": SelectWidget(), + # "cm_melody_id": TextInputWidget(), + # "incipit_of_refrain": TextInputWidget(), + # "later_addition": TextInputWidget(), + # "rubrics": TextInputWidget(), } manuscript_full_text_std_spelling = forms.CharField( @@ -347,12 +351,13 @@ class Meta: help_text="Each folio starts with '1'.", ) - segment = SelectWidgetNameModelChoiceField( - queryset=Segment.objects.all().order_by("id"), - required=True, - help_text="Select the Database segment that the chant belongs to. " - "In most cases, this will be the CANTUS segment.", - ) + # See issue #1521: Temporarily commenting out segment-related functions on Chant + # segment = SelectWidgetNameModelChoiceField( + # queryset=Segment.objects.all().order_by("id"), + # required=True, + # help_text="Select the Database segment that the chant belongs to. " + # "In most cases, this will be the CANTUS segment.", + # ) class SourceEditForm(forms.ModelForm): diff --git a/django/cantusdb_project/main_app/templates/chant_create.html b/django/cantusdb_project/main_app/templates/chant_create.html index 39bb752cc..3e60159bc 100644 --- a/django/cantusdb_project/main_app/templates/chant_create.html +++ b/django/cantusdb_project/main_app/templates/chant_create.html @@ -84,7 +84,8 @@
The server encountered a temporary error and could not fulfill your request.
+Our apologies. Please wait a few moments and try again.
+The server encountered a temporary error and could not fulfill your request.
Our apologies. Please wait a few moments and try again.
diff --git a/nginx/error_pages/504.html b/nginx/error_pages/504.html index fc06a4805..74fb4a365 100644 --- a/nginx/error_pages/504.html +++ b/nginx/error_pages/504.html @@ -2,12 +2,12 @@The server took too long to respond and could not fulfill your request.
Our apologies. Please wait a few moments and try again.
diff --git a/nginx/error_pages/CantusLogoSmall.gif b/nginx/error_pages/CantusLogoSmall.gif deleted file mode 100644 index 7c2b19440..000000000 Binary files a/nginx/error_pages/CantusLogoSmall.gif and /dev/null differ diff --git a/nginx/error_pages/background.jpg b/nginx/error_pages/background.jpg deleted file mode 100644 index 746a98a51..000000000 Binary files a/nginx/error_pages/background.jpg and /dev/null differ diff --git a/nginx/error_pages/favicon.ico b/nginx/error_pages/favicon.ico deleted file mode 100644 index 07a2d4dbf..000000000 Binary files a/nginx/error_pages/favicon.ico and /dev/null differ diff --git a/nginx/password/.htpasswd b/nginx/password/.htpasswd new file mode 100644 index 000000000..4453f326c --- /dev/null +++ b/nginx/password/.htpasswd @@ -0,0 +1 @@ +# Note: This file is intentionally empty for development and production environments. It will be replaced with a file containing a hashed password on the staging server by ansible. \ No newline at end of file