summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/products/models.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/products/models.py b/app/products/models.py
index d4dd5a8..375c0cb 100644
--- a/app/products/models.py
+++ b/app/products/models.py
@@ -68,15 +68,12 @@ class Product(models.Model):
return ''
def admin_thumbnail(self):
- return format_html('<img src="%s" width="100" style="width:100px" />' % (self.get_image_url()))
+ return format_html('<img src="%s" width="100" style="width:100px" />' % (self.featured_image.get_thumbnail_url()))
admin_thumbnail.short_description = 'Thumbnail'
def get_full_name(self):
return "%s %s" % (self.brand.name, self.name)
- def get_image_url(self):
- return '%sbook-covers/%s' % (settings.IMAGES_URL, self.image.name.split('/')[-1])
-
def save(self, *args, **kwargs):
md = render_images(self.body_markdown)
prods = render_products(md)