##// END OF EJS Templates
Use proper cached static image for unknown file
neko259 -
r1275:ec03da5d default
parent child Browse files
Show More
@@ -1,4 +1,5 b''
1 from django.template.defaultfilters import filesizeformat
1 from django.template.defaultfilters import filesizeformat
2 from django.templatetags.static import static
2
3
3
4
4 class AbstractViewer:
5 class AbstractViewer:
@@ -19,10 +20,10 b' class AbstractViewer:'
19
20
20 def get_view(self):
21 def get_view(self):
21 return '<div class="image"><a href="{}">'\
22 return '<div class="image"><a href="{}">'\
22 '<img src="/static/images/file.png" width="200" height="150"/>'\
23 '<img src="{}" width="200" height="150"/>'\
23 '</a>'\
24 '</a>'\
24 '<div class="image-metadata">{}, {}</div>'\
25 '<div class="image-metadata">{}, {}</div>'\
25 '</div>'.format(self.file.url, self.file_type,
26 '</div>'.format(self.file.url, static('images/file.png'), self.file_type,
26 filesizeformat(self.file.size))
27 filesizeformat(self.file.size))
27
28
28
29
General Comments 0
You need to be logged in to leave comments. Login now