use self.attrs in AbstractRendition.img_tag to avoid duplication

This commit is contained in:
Matt Westcott 2014-06-19 17:28:34 +01:00
parent 188b17526d
commit 4e8e1f97ca

View file

@ -243,9 +243,7 @@ class AbstractRendition(models.Model):
)
def img_tag(self):
return mark_safe(
'<img src="%s" width="%d" height="%d" alt="%s">' % (escape(self.url), self.width, self.height, escape(self.image.title))
)
return mark_safe('<img %s>' % self.attrs)
class Meta:
abstract = True