# HG changeset patch # User neko259 # Date 2015-08-18 09:06:28 # Node ID ec03da5d4835a45fcb2fbf5a8b405dc4a0f55c97 # Parent 44c8a3f3f424a2fc46bf95db33e03334ebc0708f Use proper cached static image for unknown file diff --git a/boards/models/attachment/viewers.py b/boards/models/attachment/viewers.py --- a/boards/models/attachment/viewers.py +++ b/boards/models/attachment/viewers.py @@ -1,4 +1,5 @@ from django.template.defaultfilters import filesizeformat +from django.templatetags.static import static class AbstractViewer: @@ -19,10 +20,10 @@ class AbstractViewer: def get_view(self): return '
'\ - ''\ + ''\ ''\ ''\ - '
'.format(self.file.url, self.file_type, + ''.format(self.file.url, static('images/file.png'), self.file_type, filesizeformat(self.file.size))