diff --git a/signbank/api_interface.py b/signbank/api_interface.py index aea286fc6..f2a102720 100644 --- a/signbank/api_interface.py +++ b/signbank/api_interface.py @@ -65,13 +65,16 @@ def api_fields(dataset, language_code='en', advanced=False): api_fields_2023.append(_("Video")) api_fields_2023.append(_("Tags")) api_fields_2023.append(_("Affiliation")) + api_fields_2023.append(_("Sequential Morphology")) + api_fields_2023.append(_("Simultaneous Morphology")) + api_fields_2023.append(_("Blend Morphology")) fieldnames = FIELDS['main'] + FIELDS['phonology'] + FIELDS['semantics'] + ['inWeb', 'isNew', 'excludeFromEcv'] gloss_fields = [Gloss.get_field(fname) for fname in fieldnames if fname in Gloss.get_field_names()] # TO DO - extra_columns = ['Sign Languages', 'Dialects', 'Sequential Morphology', 'Simultaneous Morphology', - 'Blend Morphology', 'Relations to other signs', 'Relations to foreign signs', 'Notes'] + extra_columns = ['Sign Languages', 'Dialects', + 'Relations to other signs', 'Relations to foreign signs', 'Notes'] # show advanced properties for field in gloss_fields: diff --git a/signbank/dictionary/models.py b/signbank/dictionary/models.py index 6c7a2839a..63bd56476 100755 --- a/signbank/dictionary/models.py +++ b/signbank/dictionary/models.py @@ -1504,6 +1504,21 @@ def get_fields_dict(self, fieldnames, language_code='en'): affiliation_names_of_gloss = sorted(affiliation_names_of_gloss) fields[affiliation_fieldname] = affiliation_names_of_gloss + sequential_morphology_fieldname = gettext("Sequential Morphology") + sequential_morphology = self.get_hasComponentOfType_display() + if sequential_morphology: + fields[sequential_morphology_fieldname] = sequential_morphology + + simultaneous_morphology_fieldname = gettext("Simultaneous Morphology") + simultaneous_morphology = self.get_morpheme_display() + if simultaneous_morphology: + fields[simultaneous_morphology_fieldname] = simultaneous_morphology + + blend_morphology_fieldname = gettext("Blend Morphology") + blend_morphology = self.get_blendmorphology_display() + if blend_morphology: + fields[blend_morphology_fieldname] = blend_morphology + return fields @staticmethod