From 97a532696024abba68d1c9a826369e5141a3a518 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Mon, 22 Feb 2021 11:02:21 -0500 Subject: fixed a bug in image path vars --- app/media/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/media') diff --git a/app/media/models.py b/app/media/models.py index 83a2c7a..48fe9c9 100644 --- a/app/media/models.py +++ b/app/media/models.py @@ -147,7 +147,7 @@ class LuxImage(models.Model): def get_image_url_by_size(self, size="original"): if size == "original": - return self.image.url + return "%soriginal/%s/%s.%s" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.image_name, self.image_ext) if size == "admin_insert": return "images/%s/%s.%s" % (self.pub_date.strftime("%Y"), self.image_name, self.image_ext) else: -- cgit v1.2.3-70-g09d2