diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-04-30 15:21:25 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-06-12 08:43:58 +0200 |
commit | 962b8fd05606c8187b33e9c2bf1e88985f548802 (patch) | |
tree | 8ea4879f9ba3a6a926681b60c5fa15eb97bd941b /ishtar_common/models.py | |
parent | 95037e04ba060fe5a9fea32fd8dc613b87c238b7 (diff) | |
download | Ishtar-962b8fd05606c8187b33e9c2bf1e88985f548802.tar.bz2 Ishtar-962b8fd05606c8187b33e9c2bf1e88985f548802.zip |
Relation graph: add logical fields in relations
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index ccbe486e0..cbf1431a7 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1404,6 +1404,13 @@ class BaseHistorizedItem(FullSearch, Imported, JsonData, FixAssociated): return True +LOGICAL_TYPES = ( + ('above', _(u"Above")), + ('bellow', _(u"Bellow")), + ('equal', _(u"Equal")) +) + + class GeneralRelationType(GeneralType): order = models.IntegerField(_(u"Order"), default=1) symmetrical = models.BooleanField(_(u"Symmetrical")) @@ -1412,6 +1419,9 @@ class GeneralRelationType(GeneralType): inverse_relation = models.ForeignKey( 'self', verbose_name=_(u"Inverse relation"), blank=True, null=True) + logical_relation = models.CharField( + verbose_name=_(u"Logical relation"), max_length=10, + choices=LOGICAL_TYPES, blank=True, null=True) class Meta: abstract = True |