fix
This commit is contained in:
parent
0a043b87ad
commit
97a634204f
@ -64,13 +64,13 @@ def results(request):
|
|||||||
|
|
||||||
|
|
||||||
def photos(request):
|
def photos(request):
|
||||||
files = glob.glob("photos/*.webp")
|
files = glob.glob("photos/*.jpg")
|
||||||
rtn = []
|
rtn = []
|
||||||
for file in files:
|
for file in files:
|
||||||
img = PIL.Image.open(file)
|
img = PIL.Image.open(file)
|
||||||
rtn.append({
|
rtn.append({
|
||||||
'original': '/' + file,
|
'original': '/' + file.replace(".jpg", ".webp"),
|
||||||
'thumbnail': '/' + file.replace('photos/', 'photos/thumbnail/'),
|
'thumbnail': '/' + file.replace('photos/', 'photos/thumbnail/').replace(".jpg", ".webp"),
|
||||||
'original_width': img.width,
|
'original_width': img.width,
|
||||||
'original_height': img.height,
|
'original_height': img.height,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user