diff options
Diffstat (limited to 'app/blog/widgets.py')
-rw-r--r-- | app/blog/widgets.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/blog/widgets.py b/app/blog/widgets.py index ec1bd1d..9295641 100644 --- a/app/blog/widgets.py +++ b/app/blog/widgets.py @@ -18,9 +18,14 @@ class AdminImageWidget(AdminFileWidget): def render(self, name, value, attrs=None): output = [] file_name = str(value) + help_text = '' if file_name: file_path = '%s' % (file_name) - output.append('<a target="_blank" href="%s">%s</a>' % (file_path, thumbnail(file_name))) + if attrs['id'] == 'id_thumbnail': + help_text = '160 wide' + if attrs['id'] == 'id_image': + help_text = '205px high' + output.append('<span>%s</span><a target="_blank" href="%s">%s</a>' % (help_text, file_path, thumbnail(file_name))) output.append(super(AdminFileWidget, self).render(name, value, attrs)) return mark_safe(''.join(output)) |