mirror of
https://github.com/karl0ss/ai_image_frame_server.git
synced 2025-04-29 03:33:39 +01:00
sort gallery by new-old, move to -slim docker image
This commit is contained in:
parent
5ab4d76d4a
commit
42c8a2b988
@ -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
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user