diff --git a/apis_ontology/migrations/0047_expression_language_work_language.py b/apis_ontology/migrations/0047_expression_language_work_language.py new file mode 100644 index 0000000..daceb91 --- /dev/null +++ b/apis_ontology/migrations/0047_expression_language_work_language.py @@ -0,0 +1,42 @@ +# Generated by Django 4.2.11 on 2024-03-28 12:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("apis_ontology", "0046_expression_isbn"), + ] + + operations = [ + migrations.AddField( + model_name="expression", + name="language", + field=models.CharField( + blank=True, + choices=[ + ("deu", "Deutsch"), + ("eng", "Englisch"), + ("fra", "Französisch"), + ], + default="", + max_length=3, + verbose_name="Sprache", + ), + ), + migrations.AddField( + model_name="work", + name="language", + field=models.CharField( + blank=True, + choices=[ + ("deu", "Deutsch"), + ("eng", "Englisch"), + ("fra", "Französisch"), + ], + default="", + max_length=3, + verbose_name="Sprache", + ), + ), + ] diff --git a/apis_ontology/models.py b/apis_ontology/models.py index 5fae7e9..d0a29d8 100644 --- a/apis_ontology/models.py +++ b/apis_ontology/models.py @@ -288,7 +288,7 @@ class Meta: @reversion.register(follow=["rootobject_ptr"]) -class Work(TitlesMixin, StatusMixin, AbstractEntity): +class Work(TitlesMixin, LanguageMixin, StatusMixin, AbstractEntity): """ The abstract notion of an intellectual creation, irrespective of its exact transmitted version, language or other form. @@ -535,7 +535,12 @@ class Meta: @reversion.register(follow=["rootobject_ptr"]) class Expression( - TitlesMixin, DescriptionMixin, NotesMixin, StatusMixin, AbstractEntity + TitlesMixin, + DescriptionMixin, + LanguageMixin, + NotesMixin, + StatusMixin, + AbstractEntity, ): """ A concrete representation of a given Work,