sort gallery by new-old, move to -slim docker image

This commit is contained in:
Karl Hudgell 2025-04-04 08:27:46 +01:00
parent 5ab4d76d4a
commit 42c8a2b988
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,5 @@
# Use an official Python image as a base # Use an official Python image as a base
FROM python:3.11 FROM python:3.11-slim
# Set the working directory in the container # Set the working directory in the container
WORKDIR /app WORKDIR /app

View File

@ -42,6 +42,7 @@ def gallery() -> str:
str: The rendered HTML template. str: The rendered HTML template.
""" """
images = [f for f in os.listdir(image_folder) if f.lower().endswith(('png', 'jpg', 'jpeg', 'gif'))] images = [f for f in os.listdir(image_folder) if f.lower().endswith(('png', 'jpg', 'jpeg', 'gif'))]
images = sorted(images, reverse=True)
return render_template("gallery.html", images=images) return render_template("gallery.html", images=images)