def render(self, name, value, attrs=None):
        output = super(AdminImageWidget, self).render(name, value, attrs)
        if value and hasattr(value, 'url'):
            ext = 'JPG'
            try:
                aux_ext = str(value).split('.')
                if aux_ext[1-len(aux_ext)].lower() == 'png':
                    ext = 'PNG'
                if aux_ext[len(aux_ext)-1].lower() == 'gif':
                    ext = 'GIF'
            except:
                pass
            try:
                mini = get_thumbnail(value, 'x80', upscale=False, format=ext)
            except Exception:
                pass
            else:
                output = (
                    '<div style="float:left">'
                    '<a style="width:%spx;display:block;margin:0 0 10px" class="thumbnail"'
                    'target="_blank" href="%s">'
                    '<img src="%s"></a>%s</div>'
                ) % (mini.width, value.url, mini.url, output)
        return mark_safe(output)
dataset/ETHPy150Open mariocesar/sorl-thumbnail/sorl/thumbnail/admin/compat.py/AdminImageWidget.render/swapped operands of `-`