From 7cf67e41959c1014e4f4c1d4098e37f5b1c0b330 Mon Sep 17 00:00:00 2001 From: Piotr Dobrowolski Date: Wed, 13 Dec 2017 21:30:15 +0100 Subject: [PATCH] models: Store more sensible item image changelog --- storage/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storage/models.py b/storage/models.py index edd40dc..cf1729c 100644 --- a/storage/models.py +++ b/storage/models.py @@ -88,6 +88,9 @@ class ItemImage(models.Model): item = models.ForeignKey(Item, related_name='images') image = models.ImageField() + def __str__(self): + return '{}'.format(self.image.name) + class Label(models.Model): id = models.CharField(max_length=64, primary_key=True)