summaryrefslogtreecommitdiff
path: root/app/media
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf>2021-02-22 11:02:21 -0500
committerluxagraf <sng@luxagraf>2021-02-22 11:02:21 -0500
commit97a532696024abba68d1c9a826369e5141a3a518 (patch)
treed801f6bce4dfbd97976aa96f6a60e33224f64d7f /app/media
parentf02423e129970b1857c5a54e79c7046061ddd069 (diff)
fixed a bug in image path vars
Diffstat (limited to 'app/media')
-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 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: