summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2021-01-06 15:48:14 -0500
committerlxf <sng@luxagraf.net>2021-01-06 15:48:14 -0500
commit534fcd39b1e8d24556d3bf110245a7373ee0eeb6 (patch)
tree96fa5d3bf4f5400a3855898ca4f41afcb5a40c75 /app
parent9a699c2f11a3ba440efae086b4303fdc55e5d97f (diff)
fixed a bug in srcset fetch
Diffstat (limited to 'app')
-rw-r--r--app/media/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/media/models.py b/app/media/models.py
index c266c4f..fe12a55 100644
--- a/app/media/models.py
+++ b/app/media/models.py
@@ -129,7 +129,7 @@ class LuxImage(models.Model):
print(length)
loopnum = 1
for size in self.sizes.all():
- srcset += "%s%s/%s_%s.%s %sw" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.image_name, size.name, self.image_ext, size.width)
+ srcset += "%s%s/%s_%s.%s %sw" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.image_name, size.slug, self.image_ext, size.width)
if loopnum < length:
srcset += ", "
loopnum = loopnum+1