# alt_caption = TranslatableCharField(_("caption"), max_length=500, null=True, blank=True, help_text=_("Optional, used instead of the caption of the image object."))#
null=True,blank=True,
help_text=_("Optional, used instead of the caption of the image object."))
# class Meta:
# abstract = True
classMeta:
# verbose_name = _("image")
abstract=True
# verbose_name_plural = _("images")#
verbose_name=_("image")
verbose_name_plural=_("images")
# def render(self):
# template = """
def__str__(self):
# <figure class="image">
returngetattr(self.image,'name',"")
# <img src="{src}">#
defrender(self):
# <figcaption>
template="""
# {caption_text}
<figureclass="image">
# </figcaption>
<imgsrc="{src}">
# </figure>
# """
<figcaption>
# # TOOD Assemble caption from image's captions if empty
{caption_text}
# return mark_safe(template.format(
</figcaption>
# src=self.image.figure_image.url,
</figure>
# caption_text=mark_safe(self.alt_caption or "")
"""
# ))
returnmark_safe(template.format(
src=self.image.url,
# TODO See comments on ImageBase; remove DownloadBase