From 534fcd39b1e8d24556d3bf110245a7373ee0eeb6 Mon Sep 17 00:00:00 2001 From: lxf Date: Wed, 6 Jan 2021 15:48:14 -0500 Subject: fixed a bug in srcset fetch --- app/media/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') 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 -- cgit v1.2.3-70-g09d2