Skip to content

View displaying the newest images, grouped by gallery

Sivert Olstad requested to merge newest-images into main

Closes #230 (closed).

Introduces a view that displays that chronologically displays the newest images uploaded, grouped by gallery. The same gallery can appear multiple times on the same page, if images have been uploaded to other galleries in-between uploads to the first.

The grouping is a case of the "gaps and islands problem" (DuckDuckGo it, if you're brave enough), which I initially tried to solve using Django's ORM. However, Django's built-in regroup filter does this for us! It's written almost as if to be a bug in the docs, but it saves us a lot of work.

The gallery list now has a link to the new view. I gave the button our secondary color to make it stand out more, because I felt that the new view is significant enough to warrant it.

Merge request reports