summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/photos/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/photos/models.py b/app/photos/models.py
index 84ceb0f..5bba537 100644
--- a/app/photos/models.py
+++ b/app/photos/models.py
@@ -7,6 +7,7 @@ from django.core.exceptions import ValidationError
from django.contrib.gis.db import models
from django.contrib.sitemaps import Sitemap
from django.utils.encoding import force_text
+from django.utils.html import :ormat_html
from django.utils.text import slugify
from django.conf import settings
@@ -127,8 +128,7 @@ class LuxImage(models.Model):
return "%s/%s/%s_%s.%s" % (settings.IMAGES_ROOT, self.pub_date.strftime("%Y"), base, size, self.get_image_ext())
def admin_thumbnail(self):
- return force_text('<a href="%s"><img src="%s"></a>' % (self.get_image_by_size(), self.get_image_by_size("tn")))
- admin_thumbnail.allow_tags = True
+ 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'
@property