summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-11-27 11:26:55 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:21 +0100
commit8355b16b1ae2f213de8d9f98221227f587e3b29f (patch)
tree300713d38252ed0fb9d25e48e8499b29523b7985 /ishtar_common/models.py
parenteb7e96c07ad61a6e66fa8fd94f80fa317a99afb0 (diff)
downloadIshtar-8355b16b1ae2f213de8d9f98221227f587e3b29f.tar.bz2
Ishtar-8355b16b1ae2f213de8d9f98221227f587e3b29f.zip
Documents: dynamic filter of support and medium by document type - collapse related fields on edition
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index e251fee89..ffe302454 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -2636,6 +2636,11 @@ post_delete.connect(post_save_cache, sender=SourceType)
class SupportType(GeneralType):
+ document_types = models.ManyToManyField(
+ "SourceType", blank=True, related_name='supports',
+ help_text=_("Only available for theses document types")
+ )
+
class Meta:
verbose_name = _("Support type")
verbose_name_plural = _("Support types")
@@ -2651,6 +2656,10 @@ class Format(GeneralType):
help_text=_("Template to insert an iframe for this format. Use django "
"template with a {{document}} variable matching the "
"current document."))
+ document_types = models.ManyToManyField(
+ "SourceType", blank=True, related_name='formats',
+ help_text=_("Only available for theses document types")
+ )
class Meta:
verbose_name = _("Format type")