-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1448 from Princeton-CDH/1442-no-language-source
Add "unspecified" source language option (#1442)
- Loading branch information
Showing
5 changed files
with
58 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
geniza/footnotes/migrations/0031_unspecified_source_language.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by Django 3.2.16 on 2023-08-22 19:13 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
def create_unspecified_source_language(apps, schema_editor): | ||
SourceLanguage = apps.get_model("footnotes", "SourceLanguage") | ||
SourceLanguage.objects.get_or_create( | ||
name="Unspecified (unpublished transcriptions)", code="zxx" | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("footnotes", "0030_digital_footnote_location"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython( | ||
create_unspecified_source_language, | ||
reverse_code=migrations.RunPython.noop, | ||
), | ||
migrations.AlterField( | ||
model_name="source", | ||
name="languages", | ||
field=models.ManyToManyField( | ||
help_text="The language(s) the source is written in. Note: The Unspecified language\n option should only ever be used for unpublished transcriptions, as the language of the\n transcription is already marked on the document.", | ||
to="footnotes.SourceLanguage", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters