def render_img_html(self, url=None, attrs={}): """Render an image tag for this asset""" if url is None: url = self.get_img_url() el_attrs = dict(src=url, alt=self.title) el_attrs.update(attrs) return mark_safe(img_el(el_attrs))
def render_default_img_html(cls, width=500, height=0, attrs={}): url = cls.get_default_img_url(width, height) el_attrs = dict(src=url) el_attrs.update(attrs) return mark_safe(img_el(el_attrs))