From ba01b6abbe45eb907e0b51e466048d1c47bb5b58 Mon Sep 17 00:00:00 2001 From: Daniel Quinn Date: Mon, 21 Dec 2015 02:50:33 +0000 Subject: [PATCH] Added a link to the thumbnail --- src/documents/admin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/documents/admin.py b/src/documents/admin.py index 9b515864f..055069bce 100644 --- a/src/documents/admin.py +++ b/src/documents/admin.py @@ -12,8 +12,9 @@ class DocumentAdmin(admin.ModelAdmin): save_on_top = True def thumbnail(self, obj): - return ''.format( - settings.MEDIA_URL, obj.pk) + return '' \ + '' \ + ''.format(media=settings.MEDIA_URL, pk=obj.pk) thumbnail.allow_tags = True def pdf(self, obj):