show preview
This commit is contained in:
parent
347433ceb6
commit
0494fd40cf
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ class Item(models.Model):
|
|||
|
||||
def preview(self):
|
||||
from django.utils.html import escape, mark_safe
|
||||
if "thumbnail" in self.data:
|
||||
if self.data.get("thumbnail"):
|
||||
return mark_safe('<img src="%s" style="max-width:100%%" />' % escape(self.data["thumbnail"]))
|
||||
return ""
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue