diff options
Diffstat (limited to 'app/photos/models.py')
-rw-r--r-- | app/photos/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/photos/models.py b/app/photos/models.py index 2e022e2..df8eac4 100644 --- a/app/photos/models.py +++ b/app/photos/models.py @@ -159,6 +159,9 @@ class LuxImage(models.Model): else: return "%s/%s/%s_%s.%s" % (settings.IMAGES_ROOT, self.pub_date.strftime("%Y"), base, size, self.get_image_ext()) + def get_thumbnail_url(self): + return self.get_image_by_size("tn") + def admin_thumbnail(self): return format_html('<a href="%s"><img src="%s"></a>' % (self.get_image_by_size(), self.get_image_by_size("tn"))) admin_thumbnail.short_description = 'Thumbnail' |