properly sort images
parent
47531d8387
commit
08f2b7d0af
|
@ -459,6 +459,7 @@ def view_art(v):
|
|||
|
||||
|
||||
urls = os.listdir(f'files/assets/images/{SITE_NAME}/{location_kind}')
|
||||
urls = reversed([f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{location_kind}/{x}" for x in urls])
|
||||
urls = sorted(urls, key=lambda x: int(x.split('.webp')[0]), reverse=True)
|
||||
urls = [f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{location_kind}/{x}" for x in urls]
|
||||
|
||||
return render_template(f'view_art.html', v=v, urls=urls, title=title)
|
||||
|
|
Loading…
Reference in New Issue