summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 187df4126..a5e666b13 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -3231,10 +3231,11 @@ def text_format(text, text_format):
return mark_safe(markdown(text))
elif text_format == "HT":
return mark_safe(bleach.clean(text))
- return text_format
+ return text
class BiographicalNote(BaseHistorizedItem, ValueGetter, MainItem):
+ SLUG = "biographicalnote"
denomination = models.TextField(_("Denomination"))
last_name = models.TextField(_("Last name"), blank=True, default="")
first_name = models.TextField(_("First name"), blank=True, default="")
@@ -3244,10 +3245,14 @@ class BiographicalNote(BaseHistorizedItem, ValueGetter, MainItem):
biography_format = models.CharField(
_("Biography format"), blank=True, default="NO", max_length=2, choices=TEXT_FORMAT
)
- person = models.ForeignKey(Person, blank=True, null=True, on_delete=models.SET_NULL, verbose_name=_("Person"))
+ person = models.ForeignKey(
+ Person, blank=True, null=True, on_delete=models.SET_NULL, verbose_name=_("Person"),
+ related_name="biographical_notes"
+ )
organization = models.ForeignKey(
Organization, blank=True, null=True, on_delete=models.SET_NULL,
verbose_name=_("Organization"),
+ related_name="biographical_notes"
)
class Meta: