From 0fa4634850a1891e5c42fb316d619d84a0649066 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 21 Jul 2022 16:45:01 +0200 Subject: Admin - Custom fields: exports and imports CSV, json (refs #5406) --- ishtar_common/models.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 81fc4c069..9c139086b 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -689,8 +689,8 @@ class JsonDataSection(models.Model): objects = JsonDataSectionManager() class Meta: - verbose_name = _("Json data - Menu") - verbose_name_plural = _("Json data - Menus") + verbose_name = _("Custom data - Menu") + verbose_name_plural = _("Custom data - Menus") ordering = ["order", "name"] unique_together = ("name", "content_type") @@ -743,7 +743,8 @@ class JsonDataField(models.Model): order = models.IntegerField(_("Order"), default=10) search_index = models.BooleanField(_("Use in search indexes"), default=False) section = models.ForeignKey( - JsonDataSection, blank=True, null=True, on_delete=models.SET_NULL + JsonDataSection, blank=True, null=True, on_delete=models.SET_NULL, + related_name="json_data_field", ) custom_forms = models.ManyToManyField( "CustomForm", blank=True, through="CustomFormJsonField" @@ -751,8 +752,8 @@ class JsonDataField(models.Model): objects = JsonDataFieldManager() class Meta: - verbose_name = _("Json data - Field") - verbose_name_plural = _("Json data - Fields") + verbose_name = _("Custom data - Field") + verbose_name_plural = _("Custom data - Fields") ordering = ["order", "name"] unique_together = ("content_type", "key") -- cgit v1.2.3