summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-05-09 17:49:16 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-06-12 08:44:18 +0200
commit43c017bc8dd00372f26728130b00b1cd9196fb10 (patch)
tree3c5fab3ad0c77f861ee46e18d14e7d6f848226af /ishtar_common/models.py
parentbf3810a26abe3c53fc11c4afe52e865cd5dbcc54 (diff)
downloadIshtar-43c017bc8dd00372f26728130b00b1cd9196fb10.tar.bz2
Ishtar-43c017bc8dd00372f26728130b00b1cd9196fb10.zip
Standardize related field item for imagee collections (refs #4076)
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 35be3ffc0..d4d6d2c79 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -3065,6 +3065,16 @@ class IshtarImage(ImageModel):
ordering = ('name',)
+class ThroughImage(models.Model):
+ image = models.ForeignKey(
+ IshtarImage, on_delete=models.CASCADE)
+ is_main = models.BooleanField(_(u"Main image"), default=False)
+
+ class Meta:
+ ordering = ('-is_main', 'image__name')
+ abstract = True
+
+
if settings.COUNTRY == 'fr':
class Arrondissement(models.Model):
name = models.CharField(u"Nom", max_length=30)