| changeset 231 | b7c007c10abe |
| parent 228 | 64940145bf13 |
| child 238 | ad770589f0fe |
--- a/src/iconolab/models.py Thu Oct 20 15:15:44 2016 +0200 +++ b/src/iconolab/models.py Thu Oct 20 15:30:47 2016 +0200 @@ -53,6 +53,10 @@ def __str__(self): return str(self.item_guid)+":from:"+self.collection.name + @property + def images_sorted_by_name(self): + return self.images.order_by("-name").all() + class ItemMetadata(models.Model): item = models.OneToOneField('Item', related_name='metadatas') authors = models.CharField(max_length=255, default="")