# HG changeset patch # User durandn # Date 1476970247 -7200 # Node ID b7c007c10abe0b0dee8e2307cc515c567f95b956 # Parent 9c9abc933135224d35fec8802f560043cd9f0b46 images in item lists are now ordered by name to preserve naming convention logic at the very least, before implementing a better alternative #36 diff -r 9c9abc933135 -r b7c007c10abe src/iconolab/models.py --- 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="") diff -r 9c9abc933135 -r b7c007c10abe src/iconolab/templates/iconolab/collection_home.html --- a/src/iconolab/templates/iconolab/collection_home.html Thu Oct 20 15:15:44 2016 +0200 +++ b/src/iconolab/templates/iconolab/collection_home.html Thu Oct 20 15:30:47 2016 +0200 @@ -186,7 +186,7 @@
- {% include "partials/item-images-preview.html" with item=item %} + {% include "partials/item_images_preview.html" with item=item %} {% endfor %} diff -r 9c9abc933135 -r b7c007c10abe src/iconolab/templates/partials/item-images-preview.html --- a/src/iconolab/templates/partials/item-images-preview.html Thu Oct 20 15:15:44 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -{% load thumbnail %} - -