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 | ee1551b414158380c32b3e0410ba936eb1346812 (patch) | |
| tree | 8ea4879f9ba3a6a926681b60c5fa15eb97bd941b /ishtar_common/models.py | |
| parent | 966b18821a367e3fdcfb7639e7a7019628a937e7 (diff) | |
| download | Ishtar-ee1551b414158380c32b3e0410ba936eb1346812.tar.bz2 Ishtar-ee1551b414158380c32b3e0410ba936eb1346812.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 | 
