Order photos by title

This commit is contained in:
Alexandre Iooss 2022-02-28 15:47:56 +01:00
parent c84a4e1a22
commit 7e912b225c

View file

@ -475,7 +475,9 @@ class Photo(ImageModel):
help_text=_('Public photographs will be displayed in the default views.'))
class Meta:
ordering = ['-date_added']
# We do not have a reliable date for ordering, so let's use
# the title which is incremented by most cameras
ordering = ['title']
get_latest_by = 'date_added'
verbose_name = _("photo")
verbose_name_plural = _("photos")