From 0959e0414816adbfcb3f20e7a85b0cd972236777 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 6 Dec 2020 23:34:57 +0100 Subject: Title type: add long title - Orga/Person type: add grammatical gender --- ishtar_common/models.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index e841690bb..cf0a41c54 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1631,7 +1631,18 @@ class Area(HierarchicalType): return " / ".join(label) +GENDER = ( + ("M", _("Male")), + ("F", _("Female")), + ("N", _("Neutral")), +) + + class OrganizationType(GeneralType): + grammatical_gender = models.CharField( + _("Grammatical gender"), max_length=1, choices=GENDER, + blank=True, default="") + class Meta: verbose_name = _("Organization type") verbose_name_plural = _("Organization types") @@ -1770,6 +1781,10 @@ post_save.connect(cached_label_changed, sender=Organization) class PersonType(GeneralType): + grammatical_gender = models.CharField( + _("Grammatical gender"), max_length=1, choices=GENDER, + blank=True, default="") + class Meta: verbose_name = _("Person type") verbose_name_plural = _("Person types") @@ -1833,6 +1848,8 @@ def get_publisher_label(): class TitleType(GeneralType): + long_title = models.TextField(_("Long title"), default="", blank=True) + class Meta: verbose_name = _("Title type") verbose_name_plural = _("Title types") -- cgit v1.2.3